Courseiva
Workload-Specific Database DesignmediumMultiple ChoiceObjective-mapped

DBS-C01 Workload-Specific Database Design Practice Question

A company uses Amazon DynamoDB for a high-traffic leaderboard application that updates scores in real-time. The table has partition key 'game_id' and sort key 'player_id'. Queries retrieve top 10 players by score for each game. Which secondary index design is most efficient?

⚠ Common exam trap

Many exam-takers confuse LSIs with GSIs, thinking an LSI can provide a different sort key for global queries, but LSIs are limited to the same partition key as the base table and cannot be used to query across all games.

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

Create a global secondary index (GSI) with partition key 'game_id' and sort key 'score'

A global secondary index (GSI) with partition key 'game_id' and sort key 'score' allows efficient retrieval of the top 10 players per game by querying a single partition (game_id) and using the sort key to order by score descending. This avoids the 1 MB read limit per partition and provides the necessary ordering without scanning the entire table.

Answer analysis

Option-by-option breakdown

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

  • Create a global secondary index (GSI) with partition key 'game_id' and sort key 'score'

    Why this is correct

    Correct because a GSI with partition key 'game_id' and sort key 'score' enables efficient query per game, ordering by score descending to retrieve top players.

  • Create a global secondary index (GSI) with partition key 'game_id' and sort key 'player_id'

    Why it's wrong here

    Incorrect because sorting by 'player_id' does not retrieve players by score; you would need to sort after retrieval, which is inefficient.

  • Create a local secondary index (LSI) with sort key 'score'

    Why it's wrong here

    Incorrect because an LSI must share the same partition key as the base table ('game_id') and cannot be used to query across all games; also, it does not provide a different sort key that orders by score without additional sorting.

  • Do not create any index; use the base table with a scan

    Why it's wrong here

    Incorrect because scanning the entire table is inefficient and expensive for a high-traffic leaderboard, especially with real-time updates.

About these practice questions

Courseiva writes every DBS-C01 question from scratch — 1,663 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.