Re: dumb terminology question: candidate key

From: Jonathan Leffler <jleffler_at_earthlink.net>
Date: Fri, 15 Jul 2005 05:34:16 GMT
Message-ID: <sVHBe.5286$BK1.1730_at_newsread3.news.pas.earthlink.net>


Marshall Spight wrote:
> Does anyone have any insight or information on the origin
> of the term "candidate key"? It seems like a standout bad
> term in a field full of not-very-good terms.
>
> A "candidate" is something that aspires to a particular position,
> but hasn't attained it yet. So the term suggests that we're
> *considering* declaring this set of attributes to be unique,
> but we're not sure yet. We'll get back to you once we're sure.
>
> What advantage does this term have over the simpler term "key"?
> Any reason we just shouldn't all say key? We don't say "primary
> candidate key" or "foreign candidate key" do we?

In the bad old days - say 1990 - the perceived rules of the RM were that every relation had one primary key. Unfortunately, some relations had a number of unique keys - think of a table of chemical elements, where atomic number, symbol and name are each possible keys (that is, candidate keys) - so if you selected one key as the primary key (which one), the others were alternative (or was it alternate) keys. There was also the entity integrity rule that said that primary keys could not allow nulls - but alternative keys could (but an alternative key that allowed nulls was no longer a candidate key and hence not really an alternative key after all; what a tangled web nulls weave!) The collection of unique keys were all candidate keys - one was selected as the primary, and the rest became alternatives.

Then the primacy of primary keys was called into question; normalization theory didn't deal with primary keys, only with candidate keys. So primary keys lost some of their significance, and the term that was left was candidate keys.

-- 
Jonathan Leffler                   #include <disclaimer.h>
Email: jleffler_at_earthlink.net, jleffler_at_us.ibm.com
Guardian of DBD::Informix v2005.01 -- http://dbi.perl.org/
Received on Fri Jul 15 2005 - 07:34:16 CEST

Original text of this message