Re: pervasiveness of surrogate (also called synthetic) keys - Mailing list pgsql-general

From John R Pierce
Subject Re: pervasiveness of surrogate (also called synthetic) keys
Date
Msg-id 4DBF75B2.5060407@hogranch.com
Whole thread Raw
In response to Re: pervasiveness of surrogate (also called synthetic) keys  (Greg Smith <greg@2ndQuadrant.com>)
Responses Re: pervasiveness of surrogate (also called synthetic) keys  (Rob Sargent <robjsargent@gmail.com>)
Re: pervasiveness of surrogate (also called synthetic) keys  (Greg Smith <greg@2ndquadrant.com>)
List 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.



pgsql-general by date:

Previous
From: Greg Smith
Date:
Subject: Re: pervasiveness of surrogate (also called synthetic) keys
Next
From: Craig Ringer
Date:
Subject: Re: pervasiveness of surrogate (also called synthetic) keys