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: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Mon, 18 Nov 2002 04:38:18 GMT
Message-ID: <_8_B9.72294$QZ.11701@sccrnsc02>


That may be, but in either case it would be rather unusual to have a 256 byte key.
Jim
"Pablo Sanchez" <pablo_at_dev.null> wrote in message news:Xns92C9DB9A7997Epingottpingottbah_at_209.242.64.107...
> "Paul Brewer" <paul_at_paul.brewers.org.uk> wrote in
> news:3dd8142b_1_at_mk-nntp-1.news.uk.worldonline.com:
>
> > Personally, if a 'natural' VARCHAR2 key of reasonable length (say
> > 4 to 12) were available, I for one would not be inclined to invent a
> > numeric surrogate key.
>
> I would dissuade folks from using natural keys as their primary key.
> Using surrogate keys gives the application a layer between the
> business (primary key) and the implementation (surrogate key).
>
> Business rules change and what someone says will _never_ happen is
> ephemeral.
>
> I would still use the natural key but as an alternate key with a
> UNIQUE constraint on it.
> --
> Pablo Sanchez, High-Performance Database Engineering
> http://www.hpdbe.com
Received on Sun Nov 17 2002 - 22:38:18 CST

Original text of this message

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