Checking Partial Foreign Keys

Previous Next

See Also

In relationships where the key spans more than one column, you can specify that partial foreign keys are not to be checked. Partial foreign keys occur when one or more foreign key columns have the NULL value. An exception to this rule is when the parent column on which you set the NULL value is not mandatory (allows NULL values). In this case the NULL value should be checked since it is an allowed value.

If you clear the Check Partial Foreign Key checkbox in the Relationships info window, in partial foreign keys none of the foreign key column values are checked. This is not generally recommended because, as a result, foreign key column values that do not exist in the corresponding primary key column are allowed into the database if one of the other foreign key columns has the NULL value.

Only consider clearing the Check Partial Foreign Key checkbox in special cases such as overlapping foreign key situations, e.g. columns A and B form one foreign key, and columns A and C another. This allows the user to enter child records with values for A and B but not C. These records are checked with regard to the relationship on columns A-B, while the relationship on columns A-C is not checked until a value for column C is provided.

You can only clear this checkbox if you clear the Foreign Key Mandatory checkbox as well.