Re: Identity key?

From: Jan Hidders <hidders_at_REMOVE.THIS.win.tue.nl>
Date: 8 Jan 2001 22:37:30 GMT
Message-ID: <93dffa$snb$1_at_news.tue.nl>


Joe Celko wrote:
>
> >> But if you are using it as such then the term PRIMARY KEY is
> nonsense, because that describes an implementation aspect. So if your
> position is that surrogate keys have no place in a logical model, then
> primary keys should also be avoided. <<
>
> Unh? Dr. Codd would be VERY surprised to find out that his papers had
> no mention of primary keys in them <g>. I agree with the basic idea of
> the relational model that a table MUST have a key, or it is not a
> table.

That is not the issue. I didn't say that *candidate* keys have no place in the logical model. But appointing one of the candidate keys as *the* key is in my opinion an implementation decision. Of course, it makes it easier to decide which attributes to include as a foreign key if you want to make a reference. But the fact that you have to make this decision shows precisely why the relational model is sometimes not a very good way to describe the logical data model. Even Codd more or less acknowledges this as you can see in his article on the extended relational model RM/T in 1979.

> What you want is a natural key, if one exists and is easy to record.
> Why? Because you can verify the data in the database against the
> reality it is supposed to model.

Oh, I completely agree with that. In fact, I often like to quote Willard van Orman Quine (my favorite philosopher who sadly has died recently) on that: "no entity without identity". That is a deep fact and tells us that if you don't have any decent candidate key, you probably do not really understand what the entity is that you are talking about.

-- 
  Jan Hidders
Received on Mon Jan 08 2001 - 23:37:30 CET

Original text of this message