Re: Primary Key - Mailing list pgsql-general

From Ron Johnson
Subject Re: Primary Key
Date
Msg-id 473DE97B.5000403@cox.net
Whole thread Raw
In response to Re: Primary Key  (Sam Mason <sam@samason.me.uk>)
Responses Re: Primary Key  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: Primary Key  (Sam Mason <sam@samason.me.uk>)
Re: Primary Key  (Sascha Bohnenkamp <asbohnenkamp@gmx.de>)
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/16/07 12:54, Sam Mason wrote:
> On Fri, Nov 16, 2007 at 03:50:20PM -0300, Jo??o Paulo Zavanela wrote:
>> How many fields is recomended to create a primary key?
>> I'm thinking to create one with 6 fields, is much?
>
> Normally a primary key would just be a single column.  When you start
> going to that many I'd probably have a serial column as the primary key,
> and a UNIQUE index on those six fields.  Depends on what you're doing,
> though unless you've got a few years experience I'd be tempted to stay
> away from primary keys of more than a single column.

Fie on you evil synthetic key lovers.  Long live the Natural Key!

- --
Ron Johnson, Jr.
Jefferson LA  USA

%SYSTEM-F-FISH, my hovercraft is full of eels
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHPel7S9HxQb37XmcRAmPZAJ9mml45XtPRSCrAiQ7K+LCwWf5J5QCgvaSp
Zs5F1SU5CNQvnoofaxkAoIY=
=9ipR
-----END PGP SIGNATURE-----

pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: Primary Key
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Primary Key