
Answer-first summary for fast verification
Answer: Set up an Amazon DynamoDB table with a primary key that consists of the name as the partition key and the version number as the sort key. Create a global secondary index that has the category as the partition key and the name as the sort key
When you create a DynamoDB table, in addition to the table name, you must specify the primary key of the table. The primary key uniquely identifies each item in the table, so that no two items can have the same key. You can create one or more secondary indexes on a table. A secondary index lets you query the data in the table using an alternate key, in addition to queries against the primary key. DynamoDB doesn't require that you use indexes, but they give your applications more flexibility when querying your data.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A gaming company is looking to store comprehensive information about all the games they have released. Each game has unique attributes such as a name, version number, and category (e.g., sports, puzzles, strategy, etc.). Additionally, the games may have various other properties related to supported platforms and technical specifications, which can vary widely among different games.
You have been hired as an AWS Certified Developer Associate to develop a solution that fulfills the following use cases:
What solution would you recommend as the most efficient to meet these requirements?
A
Set up an Amazon RDS MySQL instance having a games table that contains columns for name, version number, and category. Configure the name column as the primary key
B
Set up an Amazon DynamoDB table with a primary key that consists of the name as the partition key and the version number as the sort key. Create a global secondary index that has the category as the partition key and the name as the sort key
C
Set up an Amazon DynamoDB table with a primary key that consists of the category as the partition key and the version number as the sort key. Create a global secondary index that has the name as the partition key
D
Permanently store the name, version number, and category information about the games in an Amazon Elasticache for Memcached instance