Assume that in a relation, more than one attributes are eligible to be primary keys. Since there can only be 1 primary key, so what we will call the other key(s)?
Assume that in a relation, more than one attributes are eligible to be primary keys. Since there can only be 1 primary key, so what we will call the other key(s)?
Solution
A candidate key is a minimal set of attributes that can uniquely identify every tuple in a relation. A relation can have several candidate keys. One of them is chosen as the primary key, and the remaining ones are still candidate keys.
Candidate keys that are not chosen as the primary key are also called alternate keys.
Option 1: a foreign key refers to the primary key of another relation, so it has nothing to do with a second eligible key in the same relation.
Option 3: a composite key is a key made of two or more attributes. It describes the structure of a key, not its eligibility to be primary.
Option 4: a super key is any set of attributes that uniquely identifies a tuple, including sets with extra, unnecessary attributes. It is broader than "eligible to be a primary key".
Related questions:
2026: 23 May Shift 2
2026: 23 May Shift 2