10.1.1: Keys and Non-Keys

Before going further, we need to be clear regarding the concept of key. We define the key of a relation to be any minimal set of attributes that uniquely identify tuples in the relation. We say minimal to eliminate trivial cases. Consider: if attribute k is a key and uniquely identifies a tuple then any combination of attributes that include k must also uniquely identify tuples. So, we restrict keys to be minimal sets of attributes that retain

the property of unique identification. Further, we define candidate keys to be the collection of keys for a relation; a database designer must choose one of the candidate keys to be the primary key.

Additionally, we define key attributes to be those attributes that are part of a key, and

non-key attributes are those attributes that are not part of any key.


Share This Book