Search Postgresql Archives

Re: Primary Key

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux