Courseiva
Workload-Specific Database DesignmediumMultiple ChoiceObjective-mapped

DBS-C01 Workload-Specific Database Design Practice Question

Network Topology
aws dynamodb describe-tabletable-name ProductCatalogquery 'Table.KeySchema'Refer to the exhibit.```Output:"AttributeName": "ProductId","KeyType": "HASH"},"AttributeName": "Category","KeyType": "RANGE"

A developer sees the above key schema for the ProductCatalog table. Which query will be most efficient for retrieving a single item?

⚠ Common exam trap

Many exam-takers assume GetItem only needs the partition key, forgetting that for tables with a composite primary key (partition key and sort key), both are required to uniquely identify and retrieve a single item.

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

GetItem with ProductId = '123' and Category = 'Books'

The ProductCatalog table's primary key is a composite key of Category (partition key) and ProductId (sort key). A GetItem operation with both the partition key and sort key provides the most efficient direct access to a single item, as it uses the primary key to retrieve the item with exactly one read operation, without any filtering or 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.

  • Query with Category = 'Books'

    Why it's wrong here

    Querying only on sort key is not efficient; it requires a scan.

  • GetItem with ProductId = '123'

    Why it's wrong here

    Without the sort key, GetItem cannot uniquely identify an item.

  • Scan the table and filter by ProductId

    Why it's wrong here

    Scan reads all items, which is inefficient.

  • GetItem with ProductId = '123' and Category = 'Books'

    Why this is correct

    Providing both keys uniquely identifies the item.

About these practice questions

One of 1,663 original DBS-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.