Courseiva
Workload-Specific Database DesignmediumMultiple ChoiceObjective-mapped

DBS-C01 Workload-Specific Database Design Practice Question

A company uses Amazon DynamoDB for a time-series IoT application. Each device sends a data point every second. The application queries data by device ID and timestamp range. Which table design is most efficient?

⚠ Common exam trap

AWS often tests the misconception that a composite partition key (device ID + timestamp) is needed for uniqueness, but the trap here is that candidates forget the sort key's role in enabling range queries and instead try to force uniqueness into the partition key, which breaks the access pattern.

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 device ID as the partition key and timestamp as the sort key.

It models the access pattern directly: using device ID as the partition key ensures all data for a device is co-located, and timestamp as the sort key enables efficient range queries (e.g., Query with KeyConditionExpression on timestamp between start and end). This design avoids hot partitions and allows DynamoDB to retrieve the exact time-series slice without scanning.

Answer analysis

Option-by-option breakdown

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

  • Use a composite key of device ID and timestamp as the partition key.

    Why it's wrong here

    Prevents querying by device ID alone.

  • Use device ID as the partition key and a random suffix as the sort key.

    Why it's wrong here

    Random sort key does not support timestamp range queries.

  • Use timestamp as the partition key and device ID as the sort key.

    Why it's wrong here

    Leads to hot partitions on timestamp.

  • Use device ID as the partition key and timestamp as the sort key.

    Why this is correct

    Allows efficient range queries on timestamp per device.

About these practice questions

This DBS-C01 question is part of Courseiva's 1,663-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.