Primary Key
- Unique identifier which identifies the row in the table. Generally a surrogate key.
- Because it is unique, each table
- primary key values must not be repeated
- can be a column or a set of columns to act as the unique identifier
Surrogate Key
Candidate Keys
- the Candidate keys uniquely identify the rows of a table. The primary key is chosen from the set of candidate keys
Alternate Keys
- the candidate keys that were not chosen to be the primary key is called the alternate key.
Foreign Keys
- The Foreign Keys in a table match to another primary key in another table. Because the primary key is unique in one table, the foreign key shall also be unique in another table.
- Foreign keys help maintain data integrity, and create referential links.