Question 36
Database ManagementTo create a one-to-one relationship in database, it is necessary that
- A.both primary and foreign key fields should have multiple key index.
- B.both primary and foreign key fields should have unique key index.
- C.only the foreign key field should have a unique index.
- D.only the primary key field should have a unique index.
Show the answer and explanation
Answer: B (both primary and foreign key fields should have unique key index.)
Explanation
In a one-to-one link each value can appear only once on both sides, so both keys must be unique.