Skip site navigation (1) Skip section navigation (2)

Re: pervasiveness of surrogate (also called synthetic) keys

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: pervasiveness of surrogate (also called synthetic) keys
Date: 2011-05-03 03:25:38
Message-ID: 4DBF75B2.5060407@hogranch.com (view raw or flat)
Thread:
Lists: pgsql-general
otoh, there's plenty of places where natural keys are optimal.   my 
company makes widgets, and we make damn sure our serial #s and part 
numbers are unique, and we use them as PK's for the various tables.   
further, the PN has a N digit prefix which is unique to a part family, 
then a M digit suffix which identifies a specific version of that PN.   
we use the N digit PN for the family tables, and the full N+M digit PN 
for the full PN tables.   serial # is globally unique across all PNs so 
its the PK of any table related directly to a widget.



In response to

Responses

pgsql-general by date

Next:From: Craig RingerDate: 2011-05-03 04:53:07
Subject: Re: pervasiveness of surrogate (also called synthetic) keys
Previous:From: Greg SmithDate: 2011-05-03 03:07:55
Subject: Re: pervasiveness of surrogate (also called synthetic) keys

Privacy Policy | About PostgreSQL
Copyright © 1996-2013 The PostgreSQL Global Development Group