A field in a table can be taken as a foreign key if
2013
A field in a table can be taken as a foreign key if
- A.
It is present in all other tables
- B.
It has unique values
- C.
Is a primary key in some other table
- D.
Is not present in any other table
Attempted by 36 students.
Show answer & explanation
Correct answer: C
Concept
A foreign key is a field (or set of fields) in one table whose values are constrained to match an existing key in another (referenced) table. The column it points to in that other table must be a key that uniquely identifies each row — in standard relational design this is the primary key of the referenced table. This referential link is what lets a foreign key value act as a reliable pointer to exactly one row elsewhere.
Application
A field qualifies as a foreign key precisely when its values reference the primary key of some other table. The defining property is not anything about the field's own table; it is the relationship that the field's values point to the primary key column of a different table, guaranteeing every foreign key value corresponds to an existing parent row.
Why the other choices fail
“Has unique values” describes a candidate/primary key within the table itself, not a reference to another table; a foreign key column may legitimately contain duplicate values (many child rows can point to the same parent).
“Is present in all other tables” is not required — a foreign key relates to exactly one referenced table, not to every table in the schema.
“Is not present in any other table” contradicts the very idea of a reference: a foreign key exists only because its values are shared with the key of another table.