Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Alternate keys.

Re: Alternate keys.

From: <sanrenkur_at_my-deja.com>
Date: Mon, 23 Oct 2000 17:52:26 GMT
Message-ID: <8t1tsm$app$1@nnrp1.deja.com>

inline

In article <8t13fk$5q4$1_at_porthos.nl.uu.net>,   "Frank" <frankbo_at_interaccess.nl> wrote:
> Inline
>
> --
> Frank
> <sanrenkur_at_my-deja.com> schreef in berichtnieuws
> 8sq3ef$j15$1_at_nnrp1.deja.com...
> > In article <39F08952.9BC60BC8_at_home.nl>,
> > frank <fbortel_at_home.nl> wrote:
> > > In the purest sense, Order No is not a primary identifier. (I
 reserve
> > > the work 'key' for a technical implementation - data modeling does
> > > not care about technical implementations).
> > > Order No is a result of a technical implementation: the need to be
> > > able to identify a particular order fast - computers are fast with
> > > numbers, so let's give it a number.
> > >
> > > The primary (or: unique) identifier is probably a combination of
> > > customer name, cust. address, products ordered, date ordered.
> >
> >
> > Order No would be an appropriate primary key if it uniquely
 identifies
> > a table row.
> >
> Yes, but Order# is "invented" to satisfy computing prerequisites.

And what is so wrong with that. Why make things more complicated than need be?

> >
> > > As you can see, you will need a lot of "real world" things to
 identify
> > > a particular order. Better introduce a number - a primary key on a
> > table.
> >
> >
> > Why introduce a sequence when you already have an appropriate key.
> Like what - order#? How do you think order numbers get generated?
> By sequences of some kind. And if not: you're on the wrong track!
> >

That's a circulat argument. First you say to make a PK based on custname,custaddr, productord, etc, Then you say "Better introduce a number".,but based on your original objecttion that OrderNo is not an appropriate PK, Gee, I'm dizzy!
> >
> > > BTW: customer would be a better example: people never refer to,
 or are
> > > referred to by numbers, always by name.
> >
> > What if you have two customers with the same name?
 You start getting the picture: see answer to Niall
> >

Yes. The picture I get is that OrderNo would be OK.

> > Sanrenkur
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Oct 23 2000 - 12:52:26 CDT

Original text of this message

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