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: Pablo Sanchez <pablo_at_dev.null>
Date: Sun, 01 Dec 2002 04:49:02 GMT
Message-ID: <Xns92D6DDF01DDE2pingottpingottbah@209.242.64.107>


Galen Boyer <galenboyer_at_hotpop.com> wrote in news:u65uegqwk.fsf_at_hotpop.com:

> I think of it more as the database designer not trusting any outside
> source for his primary keys. Let attributes be able to be
> maintained, but never, ever touch my PK's. With the use of natural
> keys, then the database designer is "trusting" that the natural key
> is the correct one.

What I was attempting to explain was the reason 'why' one shouldn't trust the business folks. It's not that they're mean, green and ugly ...

>> Furthermore, it becomes _very_ easy to auto-generate code for the
>> above.  I know because we have an code generator that generates
>> insert/update/delete PL/SQL for any schema by reading the meta data
>> from the schema itself.  All written in Perl/OraPerl.

>
> This is only a nice side effect of the design. Ease of development
> probably shouldn't be the consideration, although I succombed to
> that one in an earlier design as well.

I was presenting that as a 'bonus.' :) I wouldn't advocate a solution simply because it's easy for the developers.

-- 
Pablo Sanchez, High-Performance Database Engineering
http://www.hpdbe.com
Received on Sat Nov 30 2002 - 22:49:02 CST

Original text of this message

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