Re: What is the use of a primary key?
Date: Sun, 01 Dec 2002 17:44:51 +0200
Message-ID: <3DEA2E73.3080006_at_atbusiness.com>
--CELKO-- wrote:
>>>the candidate keys must be defined as not null and unique (just the
>>>
>>>
>same that with the primary key), so... what's the difference? <<
>
>None. When Dr. Codd first defined his model, he was still under the
>influence of the file model of data. A sequential file must have a
>sorted order on a subset of it columns to work -- merging and
>searching without it are impossible for practical purposes.
>
I greatly suspect that is the case. See e.g.
http://www.acm.org/classics/nov95/s1p2p1.html http://www.acm.org/classics/nov95/s1p3.html
This in 1969.
Candidate keys were introduced during the 70's.
>But he was too late! SQL had picked up the idea of a PRIMARY KEY, and
>given it special properities - it is automatically NOT NULL, it is the
>default target of a REFERENCES clause and some products store index on
>it differently.
>
If I can recall correctly DB2 was the first SQL-database system to
implement primary keys and that was
not until version 1.3, in 1997 - 18 years later! The standard did not
have primary keys until
SQL-92!! Can hardly blame Codd on that one.
regards,
Lauri Pietarinen
Received on Sun Dec 01 2002 - 16:44:51 CET