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 06:02:44 GMT
Message-ID: <8o%B9.73293$1O2.5806@sccrnsc04>


a surrogate key is an arbitrary key (eg a sequence). A natural key is one that is naturally part of the data (eg in the US the social security number for people)
Jim
"andi" <andi_at_a.com> wrote in message
news:ar9v6o$q1s$1_at_mawar.singnet.com.sg...
> Hi,
> Could you please explain to me what's surrogate/natural key ?
>
> TIA
>
> "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 Mon Nov 18 2002 - 00:02:44 CST

Original text of this message

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