SQL Basics Flashcards
Define Relational Database
database that organizes information into one or more tables
Define Table
A collection of data organized into rows and columns
What is another name for a Table?
Relation
Define Column
a set of data values of a particular type
Define Row
a single record in a table
What are 4 common data types?
Integer, Text, Date, and REal
Define Integer
a positive or negative WHOLE number (example, 19)
Define Text
a string of text (example, ‘Gotham City’)
Define Date & how formatted
date formatted as YYYY-MM-DD
Define Real
a decimal value (example, 1.2)
Define Statement
text that the database recognizes as a valid command
What does EVERY statement end with in SQL?
a semicolon ;
What are the 3 components of a statement?
- Clause
- Table Name
- Parameter
Define Clause
Performs specific task in SQL
How are clauses written in SQL?
ALL CAPS
What are clauses also known as?
Commands
Define Parameter
list of columns, data types, or values that are passed to a clause as an argument
Do the number of lines in a string of code affect the outcome in SQL?
NO!!
Do SQL statements need to be written all on one line, or can they be split up across multiple lines for legibility?
They can be split up into multiple lines