Re: Primary Key - Mailing list pgsql-general

From Ron Johnson
Subject Re: Primary Key
Date
Msg-id 4746F4C0.5070905@cox.net
Whole thread Raw
In response to Re: Primary Key  ("Peter Childs" <peterachilds@gmail.com>)
Responses Re: Primary Key
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/23/07 03:33, Peter Childs wrote:
>
>
> On 21/11/2007, *Sascha Bohnenkamp* <asbohnenkamp@gmx.de
> <mailto:asbohnenkamp@gmx.de>> wrote:
>
>     > Fie on you evil synthetic key lovers.  Long live the Natural Key!
>
>     think of an foreign key referencing a primary key with 6 columns *urgs*
>     never!
>
>
>
> The worse thing I meet is people who think primary keys need to be
> integer single field unique serial fields
>
> I tend to agree that primary keys should be single fields if they need
> to be referenced but should also be natural if at all possible. ie use
> car number plates rather than some serial int.

I wouldn't trust plate number to be unique over time, since the
format "ABC 123" only has a capacity of 17,576,000 vehicles.

- --
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)

iD8DBQFHRvTAS9HxQb37XmcRAiNRAJ40NhYEE7tVlx1jaBLPbjsf2RSW4ACcCLfc
QGvy8Jz9Nja0kfEJYEx9VV4=
=VnCw
-----END PGP SIGNATURE-----

pgsql-general by date:

Previous
From: Simon Riggs
Date:
Subject: Forming the UK User Group
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] AutoVacuum Behaviour Question