to each other through the use of keys and indexes key- a column of a table that contains a unique value for each row primary: for this table (can NOT repeat) foreign: relates to another record in another table (can repeat) index- a column that where the values in the rows are kept in order and in an index for faster searching
commands Keywords are generally capitalized, but depending on the engine/frontend you use, you don’t have to. Generally better safe than sorry. Several types of queries: CREATE, INSERT, SELECT, ALTER, DROP Once you get the basic patterns down, you can add in conditions/options
tableName VALUES(col1Value, col2Value, col3Value...); Can also add to only certain columns for a row, ignoring the rest See example 2-2.sql for examples
than one table, based on a foreign key relationship between the rows of data selected. Three types: left, right, inner To see exactly how these works, see example2-8.sql