Open In App

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

Like Article
Like
Save
Share
Report

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


Last Updated : 24 Oct, 2018
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads