📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

How is total participation on the 1 side of a 1:N relationship enforced in SQL?

A. By a NOT NULL foreign key on the 1 side
B. By a UNIQUE constraint
C. It is harder to enforce and may need a trigger or assertion, not just a foreign key ✅
D. By dropping the foreign key

Correct Answer: C. It is harder to enforce and may need a trigger or assertion, not just a foreign key

Explanation

Requiring every 1-side row to have at least one N-side row cannot be enforced by a simple foreign key, so triggers or assertions are needed.