Re: [GENERAL] using ID as a key - Mailing list pgsql-general

From Simon Drabble
Subject Re: [GENERAL] using ID as a key
Date
Msg-id Pine.LNX.4.10.10002041734350.29682-100000@dragon.localdomain
Whole thread Raw
In response to Re: [GENERAL] using ID as a key  (davidb@vectormath.com)
List 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 by date:

Previous
From: Ed Loehr
Date:
Subject: Re: [GENERAL] using ID as a key
Next
From: Marc Tardif
Date:
Subject: Re: [GENERAL] using ID as a key