DA0-002 Data Acquisition and Preparation Practice Question
A data analyst is validating referential integrity between orders and customers tables. Which TWO of the following checks should the analyst perform?
⚠ Common exam trap
The trap is conflating referential integrity with other constraint types — candidates often pick NOT NULL or uniqueness checks because they 'sound like' data quality checks, but referential integrity is strictly about foreign-key relationships between tables.
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
✓
Check that no customer is deleted while having orders
Referential integrity ensures that foreign key values in a child table always match a primary key value in the parent table, so option C is correct: verifying that every customer_id in orders exists in customers confirms each order references a valid customer and detects orphaned rows. Option B is also correct because preventing deletion of a customer who still has orders (or enforcing ON DELETE RESTRICT/NO ACTION or cascading appropriately) preserves the parent-child relationship and avoids orphaned orders. Option A is wrong because a non-null order_id is a primary key/entity integrity check, not referential integrity. Option D is wrong because uniqueness of customer names is a data-quality/business rule unrelated to foreign key relationships. Option E is wrong because positive order amounts are a domain or business-rule validation, not a referential integrity check.
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 that every order has a non-null order_id
Why it's wrong here
A non-null order_id validates entity integrity of the orders primary key, not the relationship to customers. Referential integrity requires each orders.customer_id to exist in customers. It is tempting because non-null primary key checks are the correct validation when confirming entity integrity within a single table.
- ✓
Check that no customer is deleted while having orders
Why this is correct
Referential integrity requires that a parent customer row cannot be removed while dependent order rows still reference it. Verifying no customer is deleted while orders exist confirms the foreign key constraint is enforced, preventing orphaned order records.
- ✓
Check that every customer_id in orders exists in customers
Why this is correct
Every customer_id in the orders table must correspond to an existing row in customers, otherwise the order references a non-existent parent. This orphan check is the core referential integrity validation between the child orders and parent customers tables.
- ✗
Check that customer names are unique
Why it's wrong here
Unique customer names do not enforce referential integrity; the requirement is that each order's customer_id matches an existing customers primary key, regardless of name duplication. It is tempting because uniqueness checks belong to entity integrity on candidate keys, which is the correct check when validating a natural key column.
- ✗
Check that order amounts are positive
Why it's wrong here
Positive order amounts validate a business or domain rule on the amount column, not the link between orders and customers. Referential integrity requires each orders.customer_id to match a customers primary key. It is tempting because range checks are the correct validation when enforcing domain constraints on numeric measures.
Go deeper
Related to this question
About these practice questions
Courseiva writes every DA0-002 question from scratch — 1,004 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 →
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 DA0-002 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 DA0-002 exam.