Re: Auto increment

From: Tim Landscheidt <tim_at_tim-landscheidt.de>
Date: 11 May 2003 20:00:28 +0000
Message-ID: <m31xz5i78j.fsf_at_lockfix.tim-landscheidt.de>


"Marshall Spight" <mspight_at_dnai.com> wrote:

> > >>There are better ways of creating identifiers.

> > > But it seems pretty common that I just want to have a key,
> > > and I don't care what the specific values are (as long as
> > > they are unique,) and I'd like to have the system supply
> > > it for me. Is there no clean way to do this?

> > In the worst cass scenario, the whole set of columns is your key.
> > If the whole set of columns doesn't form a key, than you surely are
> > making a design mistake.

> > So you'll always have a natural key.

> Ugh. So I have a table Persons with first name, last name, height, weight,
> DOB, and you want me to use that whole thing as a key? Not very appealing.
> What's wrong with a PersonId? Seriously, what's wrong with it?

And how can you distinguish two persons with the same first name, last name, height, weight and DOB without an extra ID column?

Tim Received on Sun May 11 2003 - 22:00:28 CEST

Original text of this message