From: | Sam Mason <sam(at)samason(dot)me(dot)uk> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Primary Key |
Date: | 2007-11-23 11:49:04 |
Message-ID: | 20071123114904.GR1955@frubble.xen.chris-lamb.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Nov 23, 2007 at 12:00:18PM +0100, Csaba Nagy wrote:
> I'm not sure how it is in the US, but here in Germany I just reused a
> car plate from the owner it had before me... so now the plate is
> uniquely associated at most with the car, not the owner... and I'm
> pretty sure that's not unique either.
>
> And what do you do when the things shift meaning in your natural key ?
> Cause that's a very common thing to happen to natural keys. And suddenly
> what was unique becomes not unique anymore... and the headaches begin...
>
> You're better off using synthetic keys for references between tables,
> and you can still keep your natural keys for lookup, just don't use them
> as unique join criteria, only search/filter criteria.
To me, that just confirms that using natural keys for tracking data
outside the database is wrong. For the abstractions inside the database
natural keys make a lot of sense.
Sam
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Chille | 2007-11-23 12:25:29 | autovacuum process blocks without reporting a deadlock |
Previous Message | Dragan Zubac | 2007-11-23 11:31:59 | Transaction question |