3.4 Keys
Intuitively, we think of a key as a data item that allows us to tell records apart. We need a more exact definition of the concept of key. We begin with the notion of a superkey.
3.4.1 Superkeys
A superkey is an attribute or a set of attributes that uniquely identifies an entity. This means it always allows us to tell one entity instance from another. For example, for the Student entity set, {stuId} is a superkey because it can be used to uniquely identify each student. If you have a list of all students—with their IDs, last names, first names, majors, and credits—and you are told the stuId value, there is only one student on the list with that value. If you are told the student’s last name, you might not be sure which student to choose ...
Get Databases Illuminated, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.