Professional Documents
Culture Documents
Primary Key
Primary Key
The primary key constraint uniquely identifies each record in a database table.
PKs must contain unique values and cannot contain null values.
Foreign Key
Is a key used to link two tables together.
Is a field in one table that refers to the primary key in another table.
Composite Key
Is a combination of two or more columns in a table that can be used to uniquely identify each
row in a table.
SQL
SQL is a standard language for storing, manipulating and retrieving data in databases.
SQL Joins
INNER JOIN Returns records that have matching values in both tables
LEFT JOIN Returns all records from the left table, and the matched records from the right
table
RIGHT JOIN Returns all records from the right table, and the matched records from the left
table
FULL JOIN Returns all records when there is a match in either left or right table
Index
An index is a data structure that improves the speed of data retrieval operations on a
database.