Open In App
Related Articles

GATE | Quiz for Sudo GATE 2021 | Question 5

Improve Article
Improve
Save Article
Save
Like Article
Like

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

Level Up Your GATE Prep!
Embark on a transformative journey towards GATE success by choosing Data Science & AI as your second paper choice with our specialized course. If you find yourself lost in the vast landscape of the GATE syllabus, our program is the compass you need.

Last Updated : 14 Dec, 2020
Like Article
Save Article
Previous
Next
Similar Reads