Consider the following Relational table has two attributes P and Q, where P is the primary key and Q is the foreign key referencing P with on-delete cascade.
|
P |
Q |
|
4 |
2 |
|
5 |
1 |
|
3 |
4 |
|
6 |
7 |
|
4 |
3 |
|
6 |
8 |
|
1 |
4 |
|
7 |
4 |
The set of all tables that must be additionally deleted to preserve referential integrity when the table (4, 2) is deleted is
1
(3 , 4) , (1, 4) and (7 , 4)
2
(3 , 4) , (1, 4) , (7, 4) and (4, 3)
3
(3, 4) , (1, 4) , (7, 4) , (4, 3) , (5, 1) and (6, 7)
4
Only (4, 2) is deleted