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: composed foreign key question

Re: composed foreign key question

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Mon, 19 Sep 2005 12:49:12 -0400
Message-ID: <IPCdnYVRz8mRcbPeRVn-jQ@comcast.com>

"Moritz Klein" <mklein_at_students.uni-mainz.de> wrote in message news:dgmolg$d6t$1_at_news1.zdv.uni-mainz.de...
> Mark C. Stock schrieb:
>
>> don't use a single-column SA PK if it's dependent -- use the parent's PK
>> as an FK, and add an ID column which is SA. it may make little difference
>> at this point, but i've found it best as the design grows and evolves to
>> always model dependent tables with the parent's PK + a date or ID column
>
> Only to mention it (so you don't get wrong picture of me):
> I was going to do exactly that. Use contract and lookupdate in
> option_prices table for foreign key and add a SA primary key.
>
> Greetz,
> Moritz

we might not communicating here ;-)

with your existing (contract,lookupdate) as an FK to option_prices, i'm suggesting a 3-column PK of (contract,lookupdate,id) with id being system-assigned -- your last comment sounds like you might be considering a single-column SA PK?

++ mcs Received on Mon Sep 19 2005 - 11:49:12 CDT

Original text of this message

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