AWS Certified Database – Specialty — Question 48

An online gaming company is planning to launch a new game with Amazon DynamoDB as its data store. The database should be designated to support the following use cases:
✑ Update scores in real time whenever a player is playing the game.
✑ Retrieve a player's score details for a specific game session.
A Database Specialist decides to implement a DynamoDB table. Each player has a unique user_id and each game has a unique game_id.
Which choice of keys is recommended for the DynamoDB table?

Answer options

Correct answer: D

Explanation

The correct answer, D, is appropriate because it allows for efficient querying of scores based on user_id while also facilitating retrieval by game_id. This configuration supports both real-time updates and specific session score retrieval effectively. Options A and B do not provide the necessary structure for both use cases, and option C does not prioritize user_id, which is essential for real-time score updates.