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: Galen Boyer <galenboyer_at_hotpop.com>
Date: 27 Nov 2003 18:39:11 -0600
Message-ID: <ur7ztba7r.fsf@standardandpoors.com>


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.

-- 
Galen Boyer
Received on Thu Nov 27 2003 - 18:39:11 CST

Original text of this message

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