Re: identity columns
Date: Mon, 7 Jan 2002 14:03:33 +0100
Message-ID: <a1c6b6$gck$1_at_news.net.uni-c.dk>
"David Cressey" <david_at_dcressey.com> skrev i en meddelelse
news:%xg_7.94$Nq6.3940_at_petpeeve.ziplink.net...
> > Consult Date or another standard textbook.
>
> Perhaps Celko might consult "SQL for Smarties". I'm not sure what it says
> in there on the topic of
> singular or plural table names. But I'll bet Celko knows. (Hi, Joe).
Probably! - let's hear him :-)
> > As an example you might think of records of invoices, which may have a
> > natural candidate key combined of foreign keys to Customer and Order.
> > Nevertheless, a running integer is often used as a primary key, eg. to
> > document (for the auditor) that no sale is forgotten .
> >
> >
>
> I would argue that, in the case you outline here, Invoice number is not a
> "surrogate key" but is, instead, a "natural key generated by the system".
> The reason I'm calling it a natural key is that it has use outside the
> system, eg, by the auditor.'
Such a distinction between "surrogate key" and "natural key generated by
system" is a "by definition", and does not change the use of it in a
practical way.
I think we agree on the essence of the matter...
> BTW, I agree with you on the use of invoice number, and on the reasons
> why.
... as this indicate. Received on Mon Jan 07 2002 - 14:03:33 CET