A foreign key is a set of attributes in a relation schema , that references a relation if it satisfies the following rules:
- Attributes in the must have the same domain(s) as the primary key attributes , the attributes are said to refer to the relation .
- A value of in tuple of either occurs as a value of for some tuple in the relation state or it is null. In the case that the value of the on is null, it should not be part of its own primary key.