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:13:43 -0400
Message-ID: <9rGdnVohr9UnfrPeRVn-sA@comcast.com>

"Moritz Klein" <mklein_at_students.uni-mainz.de> wrote in message news:dgmmjf$d43$1_at_news1.zdv.uni-mainz.de...
> Mark C. Stock schrieb:
>

>> [_] similar issues with the option_prices table. i'm guessing this is a
>> true dependent of whatever UNDERLYING represents, so it will likely have
>> a multi-part PK. just determine what is best to use for the non-FK column
>> of the PK, again, likely a SA ID of some sort
>
> OPTION_PRICES table is a true dependent on UNDERLYING table, as every
> option needs to have an underlying. For now I have not figured out a
> natural primary key for this one and won't likely find one. This is one
> thing to to an this table, use a SA PK.
>

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

++ mcs Received on Mon Sep 19 2005 - 11:13:43 CDT

Original text of this message

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