Which states that a foreign key must either match primary key value in another relation or it must be null?

Share the Knowledge

You can help us to improve by giving your valuable suggestions at By using the service of this site, I agree that I will serve wholeheartedly and will not indulge in any sort of activity that threats the integrity of the organisation I am working for / I work for. I have a firm believe in the notion that knowledge should be open source and helping the needy and deserving part of society will always be my motto.

Which of the following states that a foreign key can either be a value which is a primary key value of referenced table or it can have a null value?

Referential integrity is a property of data stating references within it are valid. For referential integrity to hold in a relational database, any column in a base table that is declared a foreign key can contain either a null value, or only values from a parent table's primary key or a candidate key.

Which rule states that a foreign key?

Referential Integrity Rule in DBMS is based on Primary and Foreign Key. The Rule defines that a foreign key have a matching primary key. Reference from a table to another table should be valid. The rule states that the DEPT_ID in the Employee table has a matching valid DEPT_ID in the Department table.

Does a foreign key need to be a primary key in the same relation?

A foreign key is a set of one or more columns in any table (not necessarily a candidate key, let alone the primary key, of that table) which may hold the value(s) found in the primary key column(s) of some other table. So we must have a primary key to match the foreign key.

In which relationship does primary key and foreign key take reference?

In a foreign key reference, a link is created between two tables when the column or columns that hold the primary key value for one table are referenced by the column or columns in another table. This column becomes a foreign key in the second table. For example, the Sales.