Question 773 of 1,730
Workload-Specific Database DesignmediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is to use user ID as the partition key and order date as the sort key. This design is the most efficient because it co-locates all orders for a single user on the same physical partition, allowing the Query API to retrieve records in order without expensive scans. By leveraging a composite sort key with the order date, you can filter by date ranges using KeyConditionExpression and paginate through results naturally, as DynamoDB stores items in sort key order within each partition. On the AWS Certified Database Specialty DBS-C01 exam, this scenario tests your understanding of primary key design for access patterns—specifically, how a well-chosen sort key eliminates the need for secondary indexes or filtering. A common trap is reaching for a Global Secondary Index (GSI) on date alone, which would scatter data across partitions and require separate writes. Remember the memory tip: “Partition for identity, sort for time—query by range, never scan the line.”

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.

A company is building a mobile application that requires users to be able to query their order history quickly. The data is stored in Amazon DynamoDB, and each user has up to 10,000 orders over time. The application needs to support pagination and filtering by order date. What is the MOST efficient way to model this data in DynamoDB?

Question 1mediummultiple choice
Read the full NAT/PAT explanation →

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

Use user ID as the partition key and order date as the sort key

Option D is correct because using user ID as the partition key ensures all orders for a user are co-located on a single partition, enabling efficient queries. Adding order date as the sort key allows the application to filter and paginate by date range using the Query API with KeyConditionExpression, which is far more efficient than scanning or using a secondary index.

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.

  • Scan the entire table and filter on user ID

    Why it's wrong here

    Scanning is inefficient and costly for large tables.

  • Store all orders as a JSON document in a single item per user

    Why it's wrong here

    Item size limit of 400 KB may be exceeded, and partial updates are complex.

  • Use user ID as the partition key and a Global Secondary Index on order date

    Why it's wrong here

    GSI adds cost and eventual consistency trade-offs.

  • Use user ID as the partition key and order date as the sort key

    Why this is correct

    Allows range queries on order date and efficient pagination.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often choose a Global Secondary Index (Option C) thinking it is necessary for date-based filtering, but the sort key on the base table is more efficient and avoids the cost and eventual consistency of a GSI when the partition key already isolates the user's data.

Detailed technical explanation

How to think about this question

DynamoDB's sort key enables the Query API to perform range-based operations (e.g., between, begins_with) on the sort key attribute, which is ideal for time-series data like order history. The composite primary key (partition key + sort key) allows the application to paginate through results using the ExclusiveStartKey parameter, and the Query API returns items in sort key order by default, making date-range filtering efficient without scanning.

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: Use user ID as the partition key and order date as the sort key — Option D is correct because using user ID as the partition key ensures all orders for a user are co-located on a single partition, enabling efficient queries. Adding order date as the sort key allows the application to filter and paginate by date range using the Query API with KeyConditionExpression, which is far more efficient than scanning or using a secondary index.

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

Last reviewed: Jun 24, 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.