Difficulty: Easy
Correct Answer: a column that contains the primary key value of another (parent) table
Explanation:
Introduction / Context:Foreign keys are the backbone of referential integrity. They link child tables to parent tables, ensuring relationships remain consistent over time.
Given Data / Assumptions:
Concept / Approach:A foreign key is one or more columns in a child table whose values must match a candidate key (usually the primary key) in the parent table. This guarantees only existing parent rows can be referenced by the child.
Step-by-Step Solution:
Recall that FKs enforce referential integrity.They store key values from a parent table to represent relationships.Therefore, choose the option describing “contains the primary key of another table.”Verification / Alternative check:Any relational textbook or DBMS manual defines foreign keys this way; DDL syntax (FOREIGN KEY ... REFERENCES parent(col)) confirms it.
Why Other Options Are Wrong:Data types / null status: These are column properties, not what a foreign key is. All of the above: Incorrect since only one statement accurately defines a foreign key.
Common Pitfalls:Confusing logical FK concept with physical enforcement; some systems allow foreign keys to be deferred or not declared, but the concept remains the same.
Final Answer:a column that contains the primary key value of another (parent) table
Discussion & Comments