SQL Flashcards
What is SQL
Structured Query Language
IBM started out SQL as SEQUEL (Structured English QUEry Language) in the 1970s to query databases.
What is a database
A set of data stored in a computer
What is a relational database
A type of database that lets us store and identify data in relation to other data; often organized into tables
What are tables made of
Rows (records) and columns (which have names and data types)
What is an RDMS
Relational Database Management System; lets you create, update, and administer a relational database
Most use SQL to access the database
What is SQLite
A RDMS that uses minimal SQL
What are five popular RDMSs
MySQL, PostgreSQL, Oracle DB, SQL Server, SQLite
Where is a glossary of SQL commands
https://www.codecademy.com/articles/sql-commands
ALTER TABLE
ALTER TABLE table_name
ADD column_name datatype;
adds column to a table in a database
What are some of the most common data types in relational databases
INTEGER
TEXT
DATE YYYY-MM-DD
REAL (decimal value)
What are a statement and its components
Text a database recognizes as a valid command
clauses/commands: written in caps
table name to which the clause applies
parameter: list of columns, data types, or values that are passed into the clause as an argument
What do SELECT statements return
A table
What are constraints
add info about how a column can be used; are added after data type; tells database to reject data that does not conform
CREATE TABLE
creates a new table
INSERT INTO
adds a new row to a table