Primary key
Primary keys are used to uniquely identify data records. In the following example, the last name Miller and the first name Sam occur more than once. With the primary key, which saved in its own database column, each data record can be identified uniquely.
Primary key | First name | Last name |
1 | Betty | Miller |
2 | Sam | Cook |
3 | Ralf | Miller |
4 | Sam | Hampton |
A primary key can also be assembled from a combination of various attributes, for example when multiple database tables are connected together in another table. It is important here that each combination is unique, meaning it only occurs once.