| Employee_id | Manager_id |
|---|---|
| 20 | 40 |
| 25 | 40 |
| 30 | 35 |
| 35 | 20 |
| 40 | 45 |
| 45 | 25 |
Deleting tuple $(20,40)$ means employee id $20$ is deleted.
Since $Manager_id$ is a foreign key referencing $Employee_id$ with on-delete cascade, all tuples having $Manager_id=20$ must also be deleted.
So, tuple $(35,20)$ must be deleted.
Now, deleting employee id $35$ will again affect tuples having $Manager_id=35$.
So, tuple $(30,35)$ must also be deleted.
No tuple has $Manager_id=30$, so the cascade stops here.
Therefore, the other tuples that must be deleted are
$(35,20)$ and $(30,35)$
Online Test Series, Information About Examination,
Syllabus, Notification
and More.
Online Test Series, Information About Examination,
Syllabus, Notification
and More.