DS0-001 · Question #75
DS0-001 Question #75: Real Exam Question with Answer & Explanation
The correct answer is B: Foreign key. A foreign key enforces referential integrity by linking a column in one table to the primary key of another table, ensuring that a value in the child table must exist in the parent table - preventing orphaned records. A (Surrogate key) is not a constraint type at all; it's a synt
Question
Which of the following constraints is used to enforce referential integrity?
Options
- ASurrogate key
- BForeign key
- CUnique key
- DPrimary key
Explanation
A foreign key enforces referential integrity by linking a column in one table to the primary key of another table, ensuring that a value in the child table must exist in the parent table - preventing orphaned records.
- A (Surrogate key) is not a constraint type at all; it's a synthetic identifier (like an auto-incremented ID) used as a primary key, with no referential role.
- C (Unique key) ensures no duplicate values in a column but says nothing about relationships between tables.
- D (Primary key) uniquely identifies rows within its own table but does not enforce relationships to other tables - that's the foreign key's job.
Memory tip: Think "foreign = from another country." A foreign key points outward to another table, so it's the one that enforces the relationship (integrity) between tables.
Community Discussion
No community discussion yet for this question.