hardMultiple Choice
FC0-U71 Practice Question: A database manager is designing a new table to…
A database manager is designing a new table to store customer information for a retail company. The table needs to store a unique identifier for each customer, the customer's first and last name, email address, phone number, and date of birth. The manager also wants to ensure that the email address is always provided and that no two customers have the same email. Which of the following SQL constraints should be applied to the email column?
⚠ Common exam trap
It's easy for candidates to confuse PRIMARY KEY with UNIQUE+NOT NULL, not realizing that a table can have only one primary key and that email is often a natural key requiring both uniqueness and mandatory presence, but not necessarily the table's primary identifier.
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
✓
UNIQUE and NOT NULL
The email column must be both unique (to prevent duplicate email addresses) and NOT NULL (to ensure an email is always provided). The UNIQUE constraint enforces that no two rows have the same value, and NOT NULL guarantees that the column cannot be left empty. Together, they satisfy the requirement that every customer has a distinct, mandatory email address.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
INDEX
Why it's wrong here
An INDEX speeds lookups but enforces neither mandatory values nor uniqueness unless explicitly declared UNIQUE, so it cannot guarantee the email is always supplied and never duplicated. UNIQUE plus NOT NULL is required here. An index alone is the right tool purely for query performance on a non-constrained column.
- ✗
FOREIGN KEY
Why it's wrong here
A FOREIGN KEY constrains values to match rows in another table's key; it neither requires a value nor prevents duplicates within this column. UNIQUE NOT NULL is needed for email. FOREIGN KEY is correct when linking, for example, an orders table's customer ID back to the customers table.
- ✗
PRIMARY KEY
Why it's wrong here
A PRIMARY KEY forbids NULL, so it cannot enforce that email is always provided while also allowing the table's own surrogate identifier to remain the primary key; only one primary key is permitted per table. UNIQUE NOT NULL fits. PRIMARY KEY suits the customer ID column instead.
- ✓
UNIQUE and NOT NULL
Why this is correct
UNIQUE enforces the no-duplicate-emails requirement by rejecting any insert or update that repeats an existing value, while NOT NULL guarantees the email is always supplied. Applied together on the email column, both constraints are satisfied.
About these practice questions
One of 988 original FC0-U71 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.