MySQL Forums
Forum List  »  Newbie

Foreign Key Constraints - basic question
Posted by: Colin B asterfield
Date: April 20, 2005 06:48PM

Hi,

I have just introduced foreign key constraints onto the tables in my Database Schema, and it is causing me a problem.

An example is my Booking table which has three columns which have foreign key constraints from three different tables, but inside my program only one of these columns will have a valid value in it, the other two are legitimately NULL.

Obviously one could argue the rights and wrongs of designing ones database in this manner, but is there some way of configuring the foreign key so that it can be either null or a value in the parent table?

many thanks in advance...
Colin

Options: ReplyQuote


Subject
Written By
Posted
Foreign Key Constraints - basic question
April 20, 2005 06:48PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.