Search Postgresql Archives

Re: pervasiveness of surrogate (also called synthetic) keys

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

 



On Mon, 2011-05-02 at 20:06 -0600, Rob Sargent wrote:
> Jeff Davis wrote:
> > In particular, I think you are falsely assuming that a natural key must
> > be generated from an outside source (or some source outside of your
> > control), and is therefore not reliably unique.
> >
> > You can generate your own keys...

...

> My wife works (at the sql level) with shall we say "records about 
> people".  Real records, real people.  Somewhere around 2 million unique 
> individuals, several million source records.  They don't all have ssn, 
> they don't all have a drivers license.  They don't all have an address, 
> many have several addresses (especially over time) and separate people 
> have at one time or another lived at the same address.  You would be 
> surprise how many "bob smith"s where born on the same day.  But then 
> they weren't all born in a hospital etc etc etc.  A person may present 
> on any of a birth record, a death record, a hospital record, a drivers 
> license, a medical registry, a marriage record and so on.  There simply 
> is no natural key for a human.  We won't even worry about the 
> non-uniqueness of ssn. And please don't get her started on twins. :) 
> 
> 
> I can only imagine that other equally complex entities are just as 
> slippery when it comes time to pinpoint the natural key.

I think you missed my point. You don't have to rely on natural keys that
come from somewhere else; you can make up your own, truly unique
identifier.

Regards,
	Jeff Davis


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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