Question 343 of 1,730
Workload-Specific Database DesignhardMultiple ChoiceObjective-mapped

Quick Answer

The answer is to ensure all transactions update tables in the same order, such as always updating inventory before orders. This is correct because deadlocks in Aurora MySQL arise from circular wait conditions, where two concurrent transactions each hold a row-level lock on one table and wait for the other’s lock. By enforcing a consistent lock order, you eliminate the possibility of a cycle, as every transaction requests locks in the same sequence—a fundamental principle of InnoDB’s two-phase locking protocol. On the AWS Certified Database Specialty DBS-C01 exam, this scenario tests your understanding of deadlock prevention rather than detection or resolution; a common trap is choosing to increase lock timeout or use retry logic, which only handles symptoms. Remember the memory tip: “Lock order, no disorder”—always sequence your table updates to break the cycle before it starts.

DBS-C01 Workload-Specific Database Design Practice Question

This DBS-C01 practice question tests your understanding of workload-specific database design. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. 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.

Exhibit

Refer to the exhibit.

```
2024-03-15 10:23:45 UTC | aurora-db-instance-1: Aurora MySQL
2024-03-15 10:23:45 UTC | 10.0.1.5:12345 [3] [thread 1] [transaction 1234]
2024-03-15 10:23:45 UTC | ERROR: Deadlock found when trying to get lock; try restarting transaction
2024-03-15 10:23:45 UTC |  at line 1: UPDATE orders SET status='shipped' WHERE order_id=1001;
2024-03-15 10:23:45 UTC |  at line 2: UPDATE inventory SET quantity=quantity-1 WHERE product_id=500;
```

A database specialist is analyzing an Aurora MySQL error log and finds the above deadlock error. The application performs an update on the orders table and then updates the inventory table within the same transaction. The deadlock occurs when two concurrent transactions try to update orders and inventory in different orders. Which design change should the database specialist recommend to reduce deadlocks?

Question 1hardmultiple choice
Full question →

Exhibit

Refer to the exhibit.

```
2024-03-15 10:23:45 UTC | aurora-db-instance-1: Aurora MySQL
2024-03-15 10:23:45 UTC | 10.0.1.5:12345 [3] [thread 1] [transaction 1234]
2024-03-15 10:23:45 UTC | ERROR: Deadlock found when trying to get lock; try restarting transaction
2024-03-15 10:23:45 UTC |  at line 1: UPDATE orders SET status='shipped' WHERE order_id=1001;
2024-03-15 10:23:45 UTC |  at line 2: UPDATE inventory SET quantity=quantity-1 WHERE product_id=500;
```

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

Ensure all transactions update tables in the same order (e.g., always update inventory first, then orders)

Option B is correct because deadlocks in Aurora MySQL often occur when concurrent transactions acquire row-level locks on tables in different orders. By enforcing a consistent lock order (e.g., always updating inventory first, then orders), the database can avoid circular wait conditions, which are a necessary condition for deadlocks. This is a standard best practice for reducing deadlocks in InnoDB, which uses row-level locking and two-phase locking.

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.

  • Combine the orders and inventory tables into a single table to avoid multiple table locks

    Why it's wrong here

    Combining tables denormalizes the schema and is not a standard solution for deadlocks.

  • Ensure all transactions update tables in the same order (e.g., always update inventory first, then orders)

    Why this is correct

    Consistent lock ordering prevents circular wait conditions, reducing deadlocks.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Use SELECT ... FOR UPDATE on both tables before updating

    Why it's wrong here

    This still requires a consistent lock order; if two transactions lock in different order, deadlock can still occur.

  • Change the transaction isolation level to READ UNCOMMITTED

    Why it's wrong here

    READ UNCOMMITTED may reduce locking but can lead to dirty reads and other concurrency issues.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates may think combining tables or using SELECT ... FOR UPDATE will prevent deadlocks, but the root cause is inconsistent lock ordering, not the number of tables or the use of explicit locking.

Detailed technical explanation

How to think about this question

InnoDB uses row-level locking and a two-phase locking protocol, where locks are acquired during the transaction and released only at commit or rollback. Deadlocks occur when two transactions each hold a lock that the other needs, creating a circular wait. Aurora MySQL automatically detects deadlocks and rolls back the transaction that caused the least work, but consistent lock ordering prevents the circular wait from forming in the first place. This is a fundamental principle in database concurrency control.

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 DBS-C01 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 DBS-C01 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 DBS-C01 question test?

Workload-Specific Database Design — This question tests Workload-Specific Database Design — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Ensure all transactions update tables in the same order (e.g., always update inventory first, then orders) — Option B is correct because deadlocks in Aurora MySQL often occur when concurrent transactions acquire row-level locks on tables in different orders. By enforcing a consistent lock order (e.g., always updating inventory first, then orders), the database can avoid circular wait conditions, which are a necessary condition for deadlocks. This is a standard best practice for reducing deadlocks in InnoDB, which uses row-level locking and two-phase locking.

What should I do if I get this DBS-C01 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

Keep practising

More DBS-C01 practice questions

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 DBS-C01 practice question is part of Courseiva's free Amazon Web Services 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 DBS-C01 exam.