Primary Key Constraints
A set of fields is a superkey for a relation if:
- No two distinct tuples have the same values in all fields of the superkey
A superkey is a (candidate) key if :
- No proper subset of it is a superkey
If there’s ɭ candidate key for a relation, one of the keys is chosen (by DBA) to be the primary key.
E.g., sid is a key for Students. (What about name?) The set {sid, gpa} is a superkey.