Re: [GENERAL] using ID as a key

From: Simon Drabble <simon(at)eskimo(dot)com>
To: davidb(at)vectormath(dot)com
Cc: Postgres Group <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: [GENERAL] using ID as a key
Date: 2000-02-04 22:37:08
Message-ID: Pine.LNX.4.10.10002041734350.29682-100000@dragon.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 4 Feb 2000 davidb(at)vectormath(dot)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(at)eskimo(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hannu Krosing 2000-02-04 22:37:35 Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL
Previous Message Ed Loehr 2000-02-04 22:30:29 Re: [GENERAL] using ID as a key