📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

Which referential action is most appropriate for a mandatory OrderItem that cannot exist without its Order?

A. ON DELETE SET NULL
B. ON DELETE CASCADE ✅
C. ON DELETE SET DEFAULT
D. ON DELETE NO ACTION

Correct Answer: B. ON DELETE CASCADE

Explanation

An OrderItem has no meaning without its Order, so deleting the order should delete its items.