Re: Newbie question

From: Jon Heggland <>
Date: Tue, 21 Jun 2005 10:39:12 +0200
Message-ID: <>

In article <>, says...
> >Off the top of my head, the main
> >advantages of surrogate keys vs. natural keys are that they are stable
> >(I.e. they don't change),
> Why is this an advantage?

Cheap answer: Because Oracle doesn't support ON UPDATE CASCADE. :)

> But most natural keys don't change.
> > and they are never unknown.
> Most natural keys are never unknown.

It's hard to disagree with qualified statements like that, but as long as some natural keys may be unknown or inapplicable or whatever, surrogate keys have a use.

> >Anyway, many "real-world" keys are really surrogates---SSNs, account
> >numbers, registration numbers, student numbers and so on.
> And that is a reason for not creating new surrogates.

I'm not saying you should exclusively use surrogates and never natural keys. My point was simply "primary key != natural key"---or to elaborate: A primary key may be a natural key and vice versa, but not necessarily. And that surrogates are definitely "acceptable", and often/sometimes (YMMV) useful.

Received on Tue Jun 21 2005 - 10:39:12 CEST

Original text of this message