All mock tests are FREE till 31 December — register to save your progress
Unit 4 · Database Management Systems Paper 2 CS · June 2019

A table has attributes Employee_id (primary key) and Manager_id (foreign key referencing Employee_id with ON DELETE CASCADE), with tuples (20, 40), (25, 40), (30, 35), (35, 20), (40, 45), (45, 25). On deleting the tuple (20, 40), which other tuples must be deleted to maintain referential integrity?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. (30, 35) and (35, 20) only

Explanation

Deleting employee 20 cascades to (35, 20), whose manager was 20; deleting 35 cascades to (30, 35). No one has manager 30.

More Database Management Systems questions