Primary Key
Primary keys are used to uniquely identify records. In the following example, the last name "Miller" and the first name "Sam" appear multiple times. Each record can be uniquely identified using the primary key, which is stored in a separate database column.
Primary Key | First Name | Last Name |
1 | Betty | Miller |
2 | Sam | Cook |
3 | Ralf | Miller |
4 | Sam | Hampton |
A primary key can also consist of a combination of several attributes, for example, when multiple database tables are related to one another in another table. It is important that each combination be unique—that is, that it occur only once.