Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Design approaches about primary key

Re: Design approaches about primary key

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Fri, 28 Nov 2003 10:14:54 -0800
Message-ID: <1070043323.469959@yasure>


Galen Boyer wrote:

> On 27 Nov 2003, domenicg_at_hotmail.com wrote:
>
>

>>Using meaningless keys when meaningful ones exist is stupid
>>because you create a condition that always requires a join to
>>pick up the value that everyone understands.  

>
>
> Basing one's keys on the whims of someone else's data storage is
> dangerous.
>
>
>>Bad design -- it comes from people copying textbook examples
>>and using them in real life.

>
>
> No, it comes from people creating a database from scratch.
> Remember, a meaningful key was, on its conception, a meaningless
> key to someone else.
>
>
>>My social security number is a key, 

>
>
> It isn't guaranteed to be unique, and it certainly had no meaning
> on its creation for you.
>
>
>>so is my phone number (for a telco)

>
>
> So, what happens when I ask them to change my number to an
> unlisted one?
>
>
>>-- they don't assign a sequential number on top of that.

>
>
> I don't know how telco's design their database's but I'd bet they
> all look a bit different.

Your post contains things with which I agree and those with which I disagree. You are correct about Telcos as I pointed out. And also corect about social security numbers. And I can't argue with a statement that uses the word 'whim'.

But you are incorrect about 'textbook examples'. Too many databases are built based on some textbook example or cannabilizing a design from some other system rather than a serious analysis of the business and data integrity implications of the specific case.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Fri Nov 28 2003 - 12:14:54 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US