📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

Why is ON DELETE CASCADE considered risky for an Order and OrderItem relationship if used carelessly?

A. It always corrupts the primary key
B. It makes the foreign key nullable
C. It prevents all future inserts
D. It may delete many dependent rows silently in one operation ✅

Correct Answer: D. It may delete many dependent rows silently in one operation

Explanation

A single parent delete can cascade through many child rows, so accidental deletes can remove large amounts of data.