Open In App

GATE | Quiz for Sudo GATE 2021 | Question 5

Like Article
Like
Save
Share
Report

The following table has two attributes A and C where A is the primary key and C is the foreign key referencing A with on-delete cascade.

A   C
-----
4   6
5   6
6   5
7   4
9   4
11  7
8   6 

The set of all tuples that must be additionally deleted to preserve referential integrity when the tuple (4,6) is deleted is:

Note – This question is multiple select questions (MSQ).
(A) (11, 7)
(B) (7, 4)
(C) (4,6)
(D) (9, 4)


Answer: (A) (B) (D)

Explanation: When (4,6) is deleted. Since C is a foreign key referring A with delete on cascade, all entries with value 4 in C must be deleted. So (7, 4) and (9, 4) are deleted. As a result of this 7 and 9 are deleted from A which causes (11, 7) to be deleted.

So, options (A), (B), and (D) are correct.

Quiz of this Question
Please comment below if you find anything wrong in the above post


Last Updated : 14 Dec, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads