Re: IS it a good practice to use SERIAL as Primary Key?

Поиск
Список
Период
Сортировка
От Harald Armin Massa
Тема Re: IS it a good practice to use SERIAL as Primary Key?
Дата
Msg-id 7be3f35d0611272158y23ae088au9170aca1cfc7316f@mail.gmail.com
обсуждение исходный текст
Ответ на Re: IS it a good practice to use SERIAL as Primary Key?  (Ron Johnson <ron.l.johnson@cox.net>)
Ответы Re: IS it a good practice to use SERIAL as Primary Key?
Список 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.

В списке pgsql-general по дате отправления:

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: Why overlaps is not working
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: Solaris 10 problem