📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

How can a one-to-one relationship be enforced if the foreign key is placed in the parent table instead?

A. By adding a junction table
B. By removing the primary key
C. By adding a UNIQUE constraint on that foreign key as well ✅
D. By making the foreign key nullable only

Correct Answer: C. By adding a UNIQUE constraint on that foreign key as well

Explanation

Whichever table holds the foreign key, a UNIQUE constraint on it limits each row to one linked row, enforcing one-to-one.