What’s the best DynamoDB key structure?

You are building a game high score table in DynamoDB. You will store each user’s highest score for each game, with many games, all of which have relatively similar usage levels and numbers of players. You need to be able to look up the highest score for any game. What’s the best DynamoDB key structure?

access the highest value), your hash (partition) key should be the GameID, and there should be a range key for http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GuidelinesForTables.html#GuidelinesForTables.

You are building a game high score table in DynamoDB. You will store each user’s highest score for each game, with many games, all of which have relatively similar usage levels and numbers of players. You need to be able to look up the highest score for any game. What’s the best DynamoDB key structure?

access the highest value), your hash (partition) key should be the GameID, and there should be a range key for http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GuidelinesForTables.html#GuidelinesForTables.

A.
HighestScore as the hash / only key.

B.
GameID as the hash key, HighestScore as the range key.

C.
GameID as the hash / only key.

D.
GameID as the range / only key.

Explanation:
Explanation/Reference:
Since access and storage for games is uniform, and you need to have ordering within each game for the scores (to
HighestScore.
Partitions



Leave a Reply 0

Your email address will not be published. Required fields are marked *