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
- An attribute A of datatype varchar(20) has the value 'xyz', and the attribute B of datatype char(20) has the value 'lmnop'. Then attribute…
- Data warehouse contains _____ data that is never found in the operational environment.
- _____command is used to remove a relation from an SQL database.
- Which of the following statements is/are true? (i) Facebook has the world's largest Hadoop cluster. (ii) Hadoop 2.0 allows live stream proc…
- Data scrubbing is
- Consider a relation schema R = (A, B, C, D, E, F) on which the following functional dependencies hold : A → B B, C → D E → C D → A What are…