From the course: Database Design Fundamentals

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Determining primary keys

Determining primary keys

- [Instructor] A primary key is a unique identifier of related data. It is used to uniquely identify a row in the table. The key aspect of a primary key are that they are uniquely identifiable. Each instance of an identity can be uniquely identified. They are not, and it is important that they do not, contain nulls. Primary keys must always contain a value. This means that they are not empty entries at any time. They also must be stable. They also cannot be a value that changes. Stability is very important. Instability makes it difficult to maintain referential integrity. In the long run it can cause performance issues. Composite keys are keys that are combinations of multiple entities. Avoid composite keys when possible. It would be like combining your house number and your street name to make an ideal address because it makes it unique to your street, but not necessarily unique to an entire table. Simple common…

Contents