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: Quasi Foreign Key

Re: Quasi Foreign Key

From: Aparna Joshi <bliss_is_ignorance_at_hotmail.com>
Date: Thu, 9 Nov 2000 00:12:50 +0800
Message-ID: <3a097bae.0@news.tm.net.my>

hi steve,

as far as i know, oracle will allow u to insert null values in child even if there are no corresponding null values in the parent..

also i'm curious to know how u have created a composite primary key in the parent and then used it's single column as foreign key in child. once again as far as i've tried, the primary key in the parent has to match the foreign key in the child... so if u have a composite primary key, u must have a composite primary key.

regards,
aparna

Steve Long <steven.long_at_erols.com> wrote in message news:8tmqrt$bl0$1_at_bob.news.rcn.net...
> i have the following scenario and could use some assistance.
>
> parent table has composite primary key consisting of three columns.
>
> child table has a column which has a foreign key to parent table using the
> first column of the parent table's composite primary key. however, the
> child table's column may be null, but if it is not null it's value must be
> present in the parent table's column.
>
> the problem is that the value "null" in the child table's column is not an
> allowable value in the parent table's column since in the parent table
 this
> column is part of the primary key.
>
> any suggestions on how to implement this?
>
>
Received on Wed Nov 08 2000 - 10:12:50 CST

Original text of this message

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