Re: [GENERAL] using ID as a key

Поиск
Список
Период
Сортировка
От Simon Drabble
Тема Re: [GENERAL] using ID as a key
Дата
Msg-id Pine.LNX.4.10.10002041734350.29682-100000@dragon.localdomain
обсуждение исходный текст
Ответ на Re: [GENERAL] using ID as a key  (davidb@vectormath.com)
Список pgsql-general
On Fri, 4 Feb 2000 davidb@vectormath.com wrote:

>
> Finally, since you proclaim that you are new to database design, I cannot
> pass up this opportunity strike out against the forces of evil.  Unless you
> ABSOLUTELY cannot avoid it, never use more than one field as your primary
> key.  Oh, it seems like a good idea at design time, but it's not.  If you
> use
> complex primary keys, you and your programmers will regret it for the rest
> of
> the application's useful life.
>
>
> David Boerwinkle
>


David,

What makes this such a bad idea? I am just now implementing a db that uses two
fields as primary key, and I'd like to know what I'm letting myself and
colleagues in for! I can only guess that it will slow down queries, but that's
not something a programmer should necessarily be concerned with..

(Thankfully it is not too late to change the design if need be :) )

Simon.


--
 "Linux - open doors, not windows."

   Simon Drabble                      It's like karma for your brain.
   simon@eskimo.com


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

Предыдущее
От: Ed Loehr
Дата:
Сообщение: Re: [GENERAL] using ID as a key
Следующее
От: Marc Tardif
Дата:
Сообщение: Re: [GENERAL] using ID as a key