Re: pervasiveness of surrogate (also called synthetic) keys

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Greg Smith <greg(at)2ndQuadrant(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: pervasiveness of surrogate (also called synthetic) keys
Date: 2011-05-03 19:35:28
Message-ID: 4DC05900.5090503@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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"?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Davis 2011-05-03 21:08:33 Re: pervasiveness of surrogate (also called synthetic) keys
Previous Message Jeff Davis 2011-05-03 18:51:20 Re: pervasiveness of surrogate (also called synthetic) keys