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

From Rob Sargent
Subject Re: pervasiveness of surrogate (also called synthetic) keys
Date
Msg-id 4DC05900.5090503@gmail.com
Whole thread Raw
In response to Re: pervasiveness of surrogate (also called synthetic) keys  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: pervasiveness of surrogate (also called synthetic) keys  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-general

On 05/03/2011 12:51 PM, Jeff Davis wrote:
> 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
>
Sorry, but I'm confused, but that's common.  Isn't a "natural key" to be
compose solely from the attributes of the entity?  As in a subset of the
columns of the table in a third-normalish world. Isn't tacking on
another column with a concocted id joining the "pervassiveness"?

pgsql-general by date:

Previous
From: Jeff Davis
Date:
Subject: Re: pervasiveness of surrogate (also called synthetic) keys
Next
From: Jeff Davis
Date:
Subject: Re: pervasiveness of surrogate (also called synthetic) keys