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: Is the use of VARCHAR(256) as Primary Keys preferred in Oracle?

Re: Is the use of VARCHAR(256) as Primary Keys preferred in Oracle?

From: Galen Boyer <galenboyer_at_hotpop.com>
Date: 30 Nov 2002 21:23:10 -0600
Message-ID: <uptsmgsup.fsf@hotpop.com>


On 29 Nov 2002, afilonov_at_yahoo.com wrote:

> Honestly, I don't see why redesign in case of dummy keys is easier.
> Logical design is based on natural keys anyway. All algorithms and
> queries are based on logical design, not phisical one. There is some
> difference if this particular PK is used as FK in some other table(s).
> But, in case of natural keys, system won't allow me to put a duplicate
> SSN intil I fixed design and software. In case of dummy keys, there
> are 2 possible outcomes.
> 1. There was unique key on SSN. Attempt to enter duplicate key is
> rejected. Quick and dirty fix accepted: remove unique key on SSN.
> Next time wrong person's leg is cut off. You start real redesign of
> the system.
> 2. There was no unique key on SSN. Wrong person noticed leg cut
> off after operation. You start real redesign of the system.
>
> There is still no way around redesign.

You again dogged my answer. I said redesign of the application would have to happen. What wouldn't have to happen, with artificial keys, is redesign and rewrite of the PKs. The choice of keys isn't going to preclude a well-designed app, but choosing artificial, dummy keys makes it so one doesn't have to redefine and rewrite cascading keys.

-- 
Galen deForest Boyer
Sweet dreams and flying machines in pieces on the ground.
Received on Sat Nov 30 2002 - 21:23:10 CST

Original text of this message

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