In the relational model of databases, a candidate key of a relation is a minimal superkey for that relation; that is, a set of attributes such that
- the relation does not have two distinct tuples (i.e. rows or records in common database language) with the same values for these attributes (which means that the set of attributes is a superkey)
- there is no proper subset of these attributes for which (1) holds (which means that the set is minimal).
The constituent attributes are called prime attributes. Conversely, an attribute that does not occur in ANY candidate key is called a non-prime attribute.
Since a relation contains no duplicate tuples, the set of all its attributes is a superkey if NULL values are not used. It follows that every relation will have at least one candidate key.
The candidate keys of a relation tell us all the possible ways we can identify its tuples. As such they are an important concept for the design of database schema.
Read more about Candidate Key: Example, Determining Candidate Keys
Famous quotes containing the words candidate and/or key:
“Hear, then, a mortal Muse thy praise rehearse,
In no ignoble verse;
But such as thy own voice did practise here,
When thy first-fruits of Poesy were given,
To make thyself a welcome inmate there;
While yet a young probationer,
And candidate of Heaven.”
—John Dryden (16311700)
“Power, in Cases world, meant corporate power. The zaibatsus, the multinationals ..., had ... attained a kind of immortality. You couldnt kill a zaibatsu by assassinating a dozen key executives; there were others waiting to step up the ladder; assume the vacated position, access the vast banks of corporate memory.”
—William Gibson (b. 1948)