Re: primary and foregin keys
From: <ak_tiredofspam_at_yahoo.com>
Date: 2 Jan 2005 19:21:39 -0800
Message-ID: <1103860058.366167.327530_at_f14g2000cwb.googlegroups.com>
Date: 2 Jan 2005 19:21:39 -0800
Message-ID: <1103860058.366167.327530_at_f14g2000cwb.googlegroups.com>
<<... My first question is if it is okay to have a forgin key into "products" wich does not point out the whole primary key(e.g prod_number and date) ...>>
yes it is more or less acceptable. You may have a FK conshtraint point to a UNIQUE constraint rather then to a PK. However, such issues usually indicate serious problems in your tables design.Would you mind posting your DDL
<<... It
seems impossible to add the foregin key since oracle demands that
there must be data in the "storage" table in order to add the foregin
key. How do I solve this problem? ...>>
google 'oracle constraint INITIALLY DEFERRED' and see for yourself
Received on Mon Jan 03 2005 - 04:21:39 CET