Re: Primary Key

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Primary Key
Date: 2007-11-23 15:41:52
Message-ID: 4746F4C0.5070905@cox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/23/07 03:33, Peter Childs wrote:
>
>
> On 21/11/2007, *Sascha Bohnenkamp* <asbohnenkamp(at)gmx(dot)de
> <mailto:asbohnenkamp(at)gmx(dot)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-----

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2007-11-23 16:36:10 Re: [HACKERS] AutoVacuum Behaviour Question
Previous Message Simon Riggs 2007-11-23 14:18:58 Forming the UK User Group