From: | "Harald Armin Massa" <haraldarminmassa(at)gmail(dot)com> |
---|---|
To: | "Ron Johnson" <ron(dot)l(dot)johnson(at)cox(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: IS it a good practice to use SERIAL as Primary Key? |
Date: | 2006-11-28 05:58:54 |
Message-ID: | 7be3f35d0611272158y23ae088au9170aca1cfc7316f@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Ron,
>
> > In the "real world" there is no such thing as a primary key. At least
> not
> > over time. Not enough people understand the concept of a primary key to
> > make those things existent in the real world.
>
> There are lots of numbers. Credit card numbers, account numbers
> sales ticket numbers, etc, etc ad nauseum. Julian day and Julian
> date, even. You can't have lived in "the west" in the past 30 years
> without being surrounded by them.
Yes. There are a lot of numbers, but I the concept of a "primary key" is
totally different from the concept of "number".
a "Primary Key" is supposed to identify <something< across time and space.
Some time people thought that an IP-Number will do this... soonly after
there was NAT.
Again, somebody thougt, "every microsecond is unique", and then there was
daylight saving.
Who gives guarantees that credit card numbers will not get reused after
years of inactivity?
Yes, there are natural keys, and it's good to use them to identify things
for humans. But I got bitten many times by using them as primary. Many
things that "will not change, ever", just were changed on the next meeting.
Harald
--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
Python: the only language with more web frameworks than keywords.
From | Date | Subject | |
---|---|---|---|
Next Message | Doron Baranes | 2006-11-28 07:19:35 | Re: Solaris 10 problem |
Previous Message | Harald Armin Massa | 2006-11-28 05:51:39 | Re: PostgreSQL doesn't accept connections when Windows |