Question 113 of 982

Quick Answer

The correct answer is ON DELETE CASCADE on the foreign key constraint for Orders.CustomerID. This is because ON DELETE CASCADE is a referential action that automatically deletes all child rows in the Orders table whenever the corresponding parent row in the Customers table is removed, ensuring data integrity without manual intervention or additional triggers. On the Microsoft Azure Data Fundamentals DP-900 exam, this concept tests your understanding of foreign key constraints and referential integrity in Azure SQL Database, often appearing in scenario-based questions about maintaining consistent relationships between tables. A common trap is confusing ON DELETE CASCADE with ON UPDATE CASCADE or assuming triggers are required, but the key is that cascade handles deletes automatically at the database level. Memory tip: think "Cascade = Chain Reaction" — when the parent goes, the children follow.

DP-900 Practice Question: Identify considerations for relational data on Azure

This DP-900 practice question tests your understanding of identify considerations for relational data on azure. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A company uses Azure SQL Database for an order processing system. The Orders table has columns: OrderID (PK), CustomerID, OrderDate, TotalAmount. The Customers table has CustomerID (PK), Name, Email. The database administrator wants to ensure that when a customer record is deleted, all orders for that customer are also automatically deleted. Which database constraint should be implemented?

Question 1mediummultiple choice
Full question →

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

ON DELETE CASCADE on Orders.CustomerID

Option B is correct because ON DELETE CASCADE on the foreign key (Orders.CustomerID) automatically deletes all child rows in the Orders table when the parent row in the Customers table is deleted. This ensures referential integrity without requiring additional code or triggers, and is the standard SQL mechanism for cascading deletes in Azure SQL Database.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • ON DELETE SET NULL on Orders.CustomerID

    Why it's wrong here

    SET NULL would set the CustomerID in Orders to NULL instead of deleting the orders, which may leave orphaned data.

  • ON DELETE CASCADE on Orders.CustomerID

    Why this is correct

    CASCADE automatically deletes matching rows in the Orders table when the referenced Customer is deleted.

    Related concept

    Read the scenario before looking for a memorised answer.

  • ON UPDATE CASCADE on Customers.CustomerID

    Why it's wrong here

    ON UPDATE CASCADE applies when a parent key value is updated, not when it is deleted.

  • A trigger on Customers table

    Why it's wrong here

    While a trigger can achieve the same result, using a declarative foreign key constraint is simpler, more efficient, and recommended.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse ON DELETE CASCADE with ON UPDATE CASCADE, mistakenly thinking that updating a primary key is the same as deleting a record, or they incorrectly assume that a trigger is always required for cascading operations when a declarative constraint is available.

Detailed technical explanation

How to think about this question

Under the hood, ON DELETE CASCADE is implemented as a foreign key constraint that uses the database engine's internal referential integrity mechanism to automatically generate and execute DELETE statements on child rows when the parent row is deleted. In Azure SQL Database, this is handled at the storage engine level, ensuring atomicity—if the parent delete fails, all cascaded deletes are rolled back. A real-world scenario where this matters is in an order processing system with millions of rows: using a trigger instead of CASCADE could cause deadlocks or slower performance because triggers execute row-by-row, whereas CASCADE is optimized for batch operations.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related DP-900 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free DP-900 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this DP-900 question test?

Identify considerations for relational data on Azure — This question tests Identify considerations for relational data on Azure — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: ON DELETE CASCADE on Orders.CustomerID — Option B is correct because ON DELETE CASCADE on the foreign key (Orders.CustomerID) automatically deletes all child rows in the Orders table when the parent row in the Customers table is deleted. This ensures referential integrity without requiring additional code or triggers, and is the standard SQL mechanism for cascading deletes in Azure SQL Database.

What should I do if I get this DP-900 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This DP-900 practice question is part of Courseiva's free Microsoft 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 DP-900 exam.