Courseiva

FC0-U71 Data and Database Fundamentals Practice Question

A database administrator is designing a new table to store employee records. The administrator wants to ensure that no two employees can have the same employee identification number, and that the employee identification number cannot be left empty. Which constraint should be applied to the EmployeeID column to meet both requirements?

⚠ Common exam trap

The trap here is assuming that a UNIQUE constraint also prevents null values, when in most databases it permits one or more nulls.

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

✓

PRIMARY KEY

The PRIMARY KEY constraint uniquely identifies each row and enforces both uniqueness and non-null values. This meets the need to prevent duplicate employee identification numbers and to disallow empty values. UNIQUE allows nulls, FOREIGN KEY enforces referential integrity, and CHECK validates conditions but does not enforce uniqueness across rows.

Answer analysis

Option-by-option breakdown

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

  • ✗

    CHECK

    Why it's wrong here

    A CHECK constraint validates that values meet a specified condition, such as a range or format, but it cannot enforce uniqueness across rows. It also does not inherently prevent NULLs unless explicitly written to do so. Therefore, CHECK cannot guarantee that no two employees share the same EmployeeID, failing the uniqueness requirement.

  • ✗

    UNIQUE

    Why it's wrong here

    A UNIQUE constraint prevents duplicate values but typically allows NULL values, depending on the database system. Since the requirement also states that the employee identification number cannot be left empty, UNIQUE alone is insufficient. It would allow multiple rows with NULL EmployeeID in many DBMSs, violating the non-empty requirement.

  • ✗

    FOREIGN KEY

    Why it's wrong here

    A FOREIGN KEY enforces referential integrity by requiring values to match a primary key in another table. It does not enforce uniqueness or prevent nulls in the current table's column. Therefore, it cannot satisfy the requirement to prevent duplicate or empty EmployeeID values, and it would incorrectly link EmployeeID to another table.

  • ✓

    PRIMARY KEY

    Why this is correct

    A PRIMARY KEY constraint enforces both uniqueness and non-null values. It ensures that each EmployeeID is unique across all rows and that no row can have a NULL EmployeeID. This directly satisfies both requirements: preventing duplicate employee identification numbers and disallowing empty values in that column.

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.