Candidate Key

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

  1. 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)
  2. 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:

    If we should swap a good library for a second-rate stump speech and not ask for boot, it would be thoroughly in tune with our hearts. For deep within each of us lies politics. It is our football, baseball, and tennis rolled into one. We enjoy it; we will hitch up and drive for miles in order to hear and applaud the vitriolic phrases of a candidate we have already reckoned we’ll vote against.
    —Federal Writers’ Project Of The Wor, U.S. public relief program (1935-1943)

    The hypothesis I wish to advance is that ... the language of morality is in ... grave disorder.... What we possess, if this is true, are the fragments of a conceptual scheme, parts of which now lack those contexts from which their significance derived. We possess indeed simulacra of morality, we continue to use many of the key expressions. But we have—very largely if not entirely—lost our comprehension, both theoretical and practical, of morality.
    Alasdair Chalmers MacIntyre (b. 1929)