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: frank <fbortel_at_home.nl>
Date: Fri, 20 Oct 2000 18:03:59 GMT
Message-ID: <39F08952.9BC60BC8@home.nl>

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. 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. Still, all of the above also identifies the same order - it is therefor an alternate
key.

BTW: customer would be a better example: people never refer to, or are referred to by numbers, always by name.

To expand further: M:M relationships may very well exist in an entity model.
Oracle, however, cannot implement that - you will need to transform one M:M into two 1:M relationships.

Hth, Frank

sangs5_at_my-deja.com wrote:

> Hi..
>
> I am in the process of learning Data modeling and Data Designing. I
> would like to know how to identify an alternate key. To
> me any candiate key which is not selected to be a primary key is an
> alternate key. I have a sample table called as Order. It has Order No,
> Cust no, Order Date, Order Cost. Here Order No is the primary key.
> Customer No is the foreign key. Should I consider Order Date and Order
> Cosya as alternate keys? I request for some assistance.
>
> Bye
> Sangeetha
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Fri Oct 20 2000 - 13:03:59 CDT

Original text of this message

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