Manipulation Flashcards
What does SQL stand for?
Structured Query Language
What is SQL?
A programming language designed to manipulate data stored in relational databases.
SQL operates through _______ statements.
declarative
What are some advantages of SQL?
- accuracy
- security
- integrity
What is a Relational Database?
A database that organizes information into one or more tables.
What is a Table?
A collection of data organized into rows and columns.
What are Tables referred to as?
Relations
What is a column in a Table?
A set of data values of a particular type.
What kind of types would be in a Table column?
id TEXT
name TEXT
age INTEGER
What is a row in a Table?
A single record in a table.
T or F: All data stored in a relational database is of a certain data type.
True
What are some common data types?
INTEGER
TEXT
DATE
REAL
What type of datatype is INTEGER?
A positive or negative whole number
What type of datatype is TEXT?
A text string
What type of datatype is DATE?
The date formatted as YYYY-MM-DD
What type of datatype is REAL?
A decimal value
What is a Statement?
Text that the database recogonize as a valid command.
What do Statements always end in?
A semicolon ( ; )
CREATE TABLE table_name ( column_1 datatype, column_2 datatype, column_3 datatype ) ;
This is an example of a statement.
What is CREATE TABLE?
A clause.
What do Clauses do?
Perform specific tasks in SQL.
How are Clauses written and why?
By convention, clauses are written in capital letters.
What are Clauses also referred to as?
Commands
What does table_name refer to in the CREATE TABLE Statement?
The name of the table that the command is applied to.
What does column_1 datatype, column_2 datatype, column_3 datatype refer to in the CREATE TABLE Statement?
A parameter list of column names and the associated data type.
What is a Parameter?
A list of columns, data types, or values that are passed to a clause as an argument.
T or F: The number of lines used in a SQL statement does not matter.
True
How can a Statement be written?
1) Written all in one line
2) Split up across multiple lines (easier to read)