Re: Surrogate keys (Was: enums)

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Glaesemann <grzm(at)myrealbox(dot)com>, Dann Corbit <DCorbit(at)connx(dot)com>, Leandro Guimarães Faria Corcete Dutra <leandro(at)dutra(dot)fastmail(dot)fm>, "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Surrogate keys (Was: enums)
Date: 2006-01-24 09:57:44
Message-ID: 20060124095744.GB7766@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Thu, Jan 19, 2006 at 00:06:41 -0500,
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> The problem with SSN is that somebody other than you controls it.
> If you are the college registrar, then you control the student's
> registration number, and you don't have to change it. In fact, guess
> what: you probably generated it in the same way as a surrogate key.

I work for a University and even the numbers assigned by us get changed on a
regular basis as it is very easy for people to get entered into the
system multiple times. (And for a while campus ids were SSNs by default and we
are still in the process of making them different for everyone.) There are
several effectively surrogate keys (campus id and emplid), but they don't map
1 to 1 to real people. I believe we keep a history of campus ids, and delete
emplids for duplicates.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2006-01-24 10:22:58 Re: Isolation level in a function
Previous Message Bruno Wolff III 2006-01-24 09:45:16 Re: Updating rows (automatically) that are selected

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruno Wolff III 2006-01-24 10:04:45 Re: Surrogate keys (Was: enums)
Previous Message R, Rajesh (STSD) 2006-01-24 09:40:18 Re: [HACKERS] [PATCH] Better way to check for getaddrinfo function.