GATE 1997 6.10 Let R (a, b, c) and S(d, e, f) be two rela

GATE 1997
6.10 Let R (a, b, c) and S(d, e, f) be two relations in which d is the foreign key of S that refers to the primary key of R. Consider the following four operations R and S
(a) Insert into R (b) Insert into S
(c) Delete from R (d) Delete from S
Which of the following is true about the referential integrity constraint above?
(a) None of (a), (b), (c) or (d) can cause its violation
(b) All of (a), (b), (c) and (d) can cause its violation
(c) Both (a) and (d) can cause its violation
(d) Both (b) and (c) can cause its violation
 

Answer: D.
 I am assuming that you know what is referential integrity constraint. If not please watch lecture videos and example on it in "Example" with title " Example on Referential integrity constraint". It will be very easy to answer this and this type of question. Believe me.
as given in the problem statement, "d" in S refers to the primary key of R ie "a"( assuming a is key in R).Let us take each of the case individually.
a) it says Insertion into R, it is allowed and valid. 
b) Insertion into Secondary table is invalid.

C) Deletion from R is invalid.

D) Deletion from S is valid.

0Comment