Re: Surrogate keys

From: Chris Browne <cbbrowne(at)acm(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Surrogate keys
Date: 2006-01-19 15:42:42
Message-ID: 60oe28mdfx.fsf@dba2.int.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

mark(at)mark(dot)mielke(dot)cc writes:

> On Thu, Jan 19, 2006 at 09:37:12AM -0500, Pollard, Mike wrote:
>> Martijn van Oosterhout wrote:
>> > Please provides natural keys for any of the following:
>> > - A Person
>> > - A phone call: (from,to,date,time,duration) is not enough
>> > - A physical address
>> > - A phone line: (phone numbers arn't unique over time)
>> > - An internet account: (usernames not unique over time either)
>> Ahh, a challenge. Hmm, not sure about all of them, but here goes:
>> A Person - well, you could use a bit map of their fingerprints, or maybe
>> their retinal scan. Of course, that could change due to serious injury.
>> Maybe some kind of representation of their DNA?
>
> Yes. Representation of the DNA is probably best. But - that's a lot of
> data to use as a key in multiple tables. :-)

That is arguably about the best choice possible, for a human being, as
DNA isn't supposed to be able to change (much).

Mind you, there do exist odd cases where a person might have two sets
of DNA in different parts of their body. This commonly (well, it's
not really very common...) happens when non-identical twins share a
blood supply; that twins were involved may not be noticed if one does
not survive to birth...

>> A physical address - how about longitude/latitude/height from sea level?
>
> Planet? Solar system? Galaxy? Universe? :-)
>
> I agreed with what you had to say (the stuff I deleted). Just felt
> like being funny. Not sure if I'm successful. Hehe...

Well, that's useful for representing a key for a piece of real estate.

It's fairly interestingly useless for representing a human attribute,
at least in terms of being a primary key...
--
output = ("cbbrowne" "@" "acm.org")
http://cbbrowne.com/info/linux.html
"It's a pretty rare beginner who isn't clueless. If beginners weren't
clueless, the infamous Unix learning cliff wouldn't be a problem."
-- david parsons

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-01-19 15:43:07 Re: 8.0.5 Bug in unique indexes?
Previous Message Joshua D. Drake 2006-01-19 15:42:21 Re: 8.0.5 Bug in unique indexes?