Courseiva

FC0-U71 Data and Database Fundamentals Practice Question

In a relational database, which constraint ensures that a foreign key value matches an existing primary key value in the referenced table?

⚠ Common exam trap

Candidates often confuse the roles of primary key and foreign key constraints: candidates often think the primary key enforces referential integrity, but it only ensures uniqueness within its own table; the foreign key is the one that references the primary key in another table.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Foreign key constraint

A foreign key constraint enforces referential integrity by requiring that any value in the foreign key column(s) must either match a primary key or unique key value in the referenced table, or be NULL. This ensures that relationships between tables remain consistent and prevents orphaned records. The constraint is defined on the child table and references the parent table's primary key (or a unique key).

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Foreign key constraint

    Why this is correct

    A foreign key constraint enforces referential integrity by rejecting any insert or update whose foreign key value lacks a matching primary key in the referenced table. This directly satisfies the stem's requirement that every foreign key value correspond to an existing primary key, preventing orphaned rows.

  • ✗

    Primary key constraint

    Why it's wrong here

    A primary key constraint enforces uniqueness and non-null values on the referenced table's own column; it does not validate incoming foreign key values. The foreign key constraint performs that referential check. Primary keys are tempting because they define the referenced target, but they govern the parent table, not the child's reference.

  • ✗

    Check constraint

    Why it's wrong here

    A check constraint validates values within a single row against a Boolean expression, such as a range or format; it cannot query another table to confirm a matching primary key. Check constraints suit domain validation like age limits. Referential integrity across tables is enforced by the foreign key constraint instead.

  • ✗

    Unique constraint

    Why it's wrong here

    A unique constraint enforces distinctness within a single column or set of columns; it does not reference another table, so it cannot validate that a foreign key value exists in the parent table. It is tempting because both constraints police column values, but uniqueness applies within one table, whereas referential integrity requires the foreign key constraint.

About these practice questions

Courseiva writes every FC0-U71 question from scratch — 988 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

This FC0-U71 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the FC0-U71 exam.