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

Quick Answer

The correct answer is to add a GlobalSecondaryIndex with CustomerID as the hash key and OrderDate as the range key. This works because a GlobalSecondaryIndex (GSI) allows you to query DynamoDB using a non-key attribute as the primary partition key, enabling efficient lookups on CustomerID without altering the base table’s existing key structure. On the AWS Certified Database Specialty DBS-C01 exam, this scenario tests your understanding of when to use a GSI versus a LocalSecondaryIndex—a common trap is choosing a LocalSecondaryIndex, which only works with the base table’s partition key. Remember that GSIs are essential for querying on attributes that are not part of the table’s primary key, and they support a completely different key schema. Memory tip: “GSI for non-key queries—if it’s not the base key, think GSI.”

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.

```
Resources:
  MyDynamoDBTable:
    Type: AWS::DynamoDB::Table
    Properties:
      TableName: "Orders"
      AttributeDefinitions:
        - AttributeName: "OrderID"
          AttributeType: "S"
        - AttributeName: "OrderDate"
          AttributeType: "S"
      KeySchema:
        - AttributeName: "OrderID"
          KeyType: HASH
        - AttributeName: "OrderDate"
          KeyType: RANGE
      ProvisionedThroughput:
        ReadCapacityUnits: 10
        WriteCapacityUnits: 5
      SSESpecification:
        SSEEnabled: true
```

Refer to the exhibit. A CloudFormation template creates a DynamoDB table. The application team needs to query orders by customer ID (which is not a key attribute). Which change to the template would enable efficient querying by customer ID?

Question 1mediummultiple choice
Full question →

Exhibit

Refer to the exhibit.

```
Resources:
  MyDynamoDBTable:
    Type: AWS::DynamoDB::Table
    Properties:
      TableName: "Orders"
      AttributeDefinitions:
        - AttributeName: "OrderID"
          AttributeType: "S"
        - AttributeName: "OrderDate"
          AttributeType: "S"
      KeySchema:
        - AttributeName: "OrderID"
          KeyType: HASH
        - AttributeName: "OrderDate"
          KeyType: RANGE
      ProvisionedThroughput:
        ReadCapacityUnits: 10
        WriteCapacityUnits: 5
      SSESpecification:
        SSEEnabled: true
```

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

Add a GlobalSecondaryIndex with CustomerID as the hash key and OrderDate as the range key

Option C is correct because a GlobalSecondaryIndex (GSI) allows querying on a non-key attribute (CustomerID) with a different key schema than the base table. By specifying CustomerID as the hash key and OrderDate as the range key, the application can efficiently query orders by CustomerID and optionally sort by OrderDate, without affecting the base table's primary key structure.

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.

  • Change the KeySchema to use CustomerID as the hash key

    Why it's wrong here

    Changing key schema would break existing application logic.

  • Add a LocalSecondaryIndex on CustomerID

    Why it's wrong here

    LSI requires same partition key (OrderID), not CustomerID.

  • Add a GlobalSecondaryIndex with CustomerID as the hash key and OrderDate as the range key

    Why this is correct

    GSI allows efficient querying by CustomerID.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Enable DynamoDB Streams and use Lambda to populate a separate table

    Why it's wrong here

    Adds complexity; not a direct template change.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse LocalSecondaryIndexes (LSIs) with GlobalSecondaryIndexes (GSIs), incorrectly assuming an LSI can be created on any attribute, when in fact an LSI must share the same hash key as the base table and can only be added during table creation.

Detailed technical explanation

How to think about this question

A GlobalSecondaryIndex (GSI) maintains its own key schema and can be created on any DynamoDB table, regardless of the base table's primary key. Under the hood, DynamoDB asynchronously replicates data to the GSI, which has its own provisioned throughput and storage, allowing queries on the GSI to be as fast as base table queries. In real-world scenarios, GSIs are ideal for supporting multiple access patterns (e.g., query orders by customer, by status, or by date) without redesigning the base table schema.

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: Add a GlobalSecondaryIndex with CustomerID as the hash key and OrderDate as the range key — Option C is correct because a GlobalSecondaryIndex (GSI) allows querying on a non-key attribute (CustomerID) with a different key schema than the base table. By specifying CustomerID as the hash key and OrderDate as the range key, the application can efficiently query orders by CustomerID and optionally sort by OrderDate, without affecting the base table's primary key structure.

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.