Why is it important that the referenced column in a foreign key relationship is unique or a primary key?
hard📝 Conceptual Q10 of 15
SQL - Table Relationships
Why is it important that the referenced column in a foreign key relationship is unique or a primary key?
ATo allow multiple foreign keys to point to the same row.
BTo ensure each foreign key value matches exactly one row in the referenced table.
CTo speed up data insertion in the child table.
DTo prevent any NULL values in the child table.
Step-by-Step Solution
Solution:
Step 1: Understand uniqueness requirement
The referenced column must uniquely identify rows to avoid ambiguity in foreign key references.
Step 2: Analyze options
To ensure each foreign key value matches exactly one row in the referenced table. correctly states this reason. Others describe unrelated or incorrect effects.
Final Answer:
To ensure each foreign key value matches exactly one row in the referenced table. -> Option B
Quick Check:
Uniqueness ensures one-to-one reference [OK]
Quick Trick:Referenced key must uniquely identify rows [OK]
Common Mistakes:
MISTAKES
Thinking uniqueness speeds insertion
Believing multiple foreign keys must point to different rows
Confusing uniqueness with NULL prevention
Master "Table Relationships" in SQL
9 interactive learning modes - each teaches the same concept differently