All mock tests are FREE till 31 December — register to save your progress
Unit 4 · Database Management Systems Paper 2 CS · July 2018

Let R₁(a, b, c) and R₂(x, y, z) be relations in which a is a foreign key of R₁ referring to the primary key of R₂. Consider: (a) insert into R₁, (b) insert into R₂, (c) delete from R₁, (d) delete from R₂. Which is correct about the referential integrity constraint?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: D. Operations (d) and (a) will cause violation.

Explanation

Inserting into the referencing table R₁ can introduce a value with no match, and deleting from the referenced table R₂ can orphan rows. Operations (a) and (d) can violate it.

More Database Management Systems questions