UGC-NET | UGC NET CS 2018 July – II | Question 69

Let R1 (a, b, c) and R2 (x, y, z) be two relations in which a is the foreign key of R1 that refers to the primary key of R2 . Consider following four options.
(a)Insert into R 1
(b)Insert into R 2
(c)Delete from R 1
(d)Delete from R 2
Which of the following is correct about the referential integrity constraint with respect to above?
(A) Operations (a) and (b) will cause violation.
(B) Operations (b) and (c) will cause violation.
(C) Operations (c) and (d) will cause violation.
(D) Operations (d) and (a) will cause violation.


Answer: (D)

Explanation: Let x is the primary key in R2(x, y, z)

Insert into R1 – Can cause violation because if we want to insert any value into a of R1, which is not in x of R2.
Insert into R2 – Can not cause violation
Delete from R1 – Can not cause violation.
Delete from R2 – Can cause violation if we delete any value of x in R2, then the value referred by a in R1 should also be deleted.

Hence, option (D) is correct.


Quiz of this Question



My Personal Notes arrow_drop_up


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.