Re: identity columns

From: David Cressey <david_at_dcressey.com>
Date: Mon, 07 Jan 2002 12:30:51 GMT
Message-ID: <%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).

> 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.

BTW, I agree with you on the use of invoice number, and on the reasons why.

--
Regards,
    David Cressey
    www.dcressey.com
Received on Mon Jan 07 2002 - 13:30:51 CET

Original text of this message