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: Field Order via Oracle ODBC

Re: Field Order via Oracle ODBC

From: Randy DeWoolfson <randy_at_euclidsys.com>
Date: Fri, 11 Jun 1999 21:19:24 -0400
Message-ID: <3761B59C.9E21381B@euclidsys.com>


if you take the definition of primary key to be:

those columns of the table that when taken together are the minimal set of information that points to a unique record...

then you certainly have multiple column primary keys... like any link table in the middle of a many to many relationship.

if you like to call these fields foreign keys then the link has no primary key at all, just unique combinations of foreign keys.

my 2 cents.

(ps.. if pressed, I call the grouping of foreign key elements that create a unique row the primary key)

randy

Keri Hardwick wrote:

> Not necessarily. Sometimes the child will just have its own key
> (InvoiceDetailId) and a foreign key to the Invoice table, InvoiceNumber.
>
> Keri Hardwick
> TC wrote in message <01beb294$fa0e55e0$53fa98cb_at_pentium>...
> >
> >Brad Pybus <brad_pybus_nospam_at_hotmail.com> wrote in article
> ><%%v73.1733$sk1.2500_at_client.news.psi.net>...
> >> We never use multi-field primary keys.
> >
> >
> >But how can you avoid so doing?
> >
> >In any master/detail relationship, the detail record will normally need a
> >composite primary key, namely:
> >* the master key of the parent table, plus
> >* the extra field which distinguishes the child records for a given master.
> >
> >For example:
> >* Invoice Header -primary key = InvoiceNumber;
> >* Invoice Detail - primary key = (InvoiceNumber, InvoiceLineNumber).
> >
> >Yes? No?
> >
> >TC
> >(No email)
Received on Fri Jun 11 1999 - 20:19:24 CDT

Original text of this message

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