📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

Why does deleting a parent row sometimes take a long time?

A. Because the parent row is large
B. Because the DBMS must check every child row for a matching foreign key, which is slow without an index ✅
C. Because the DBMS deletes the whole database
D. Because foreign keys are not checked

Correct Answer: B. Because the DBMS must check every child row for a matching foreign key, which is slow without an index

Explanation

Without an index on the foreign key, the DBMS may scan the whole child table to find dependent rows before it can allow or cascade the delete.