Database Models, Architecture & ER Diagrams

Answer & solution
Official answer: 0.0
Our answer: 0
1. Follow the incoming foreign-key references to the deleted key P=3. In T2, only row (R=8,S=3) references this value through S. Its specified action is ON DELETE SET NULL, so it becomes (8,NULL).
2. Crucially, this action neither deletes the T2 row nor changes its primary key R=8. The references from T1.Q to T2.R remain valid, including Q=8 values in other T1 rows.
3. T1's ON DELETE CASCADE would apply if a referenced T2 row were deleted; that has not happened. Nor has a referenced primary key been updated. Thus no cascade returns to T1 and the number of additional deletions is 0. A change to a foreign-key field is not automatically a change to the key referenced by the opposite table.



