📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

Why is referential integrity enforced by the DBMS rather than only by application code?

A. Because application code is always faster
B. Because the DBMS has no other work to do
C. Because foreign keys cannot be checked in code
D. Because the DBMS enforces it for every application and direct data change, preventing bypasses ✅

Correct Answer: D. Because the DBMS enforces it for every application and direct data change, preventing bypasses

Explanation

Database-level constraints apply consistently even if data is changed by another program, a script or a direct SQL command, while application checks can be bypassed.