Topic 1 Question 20
A developer wants to store information about movies. Each movie has a title, release year, and genre. The movie information also can include additional properties about the cast and production crew. This additional information is inconsistent across movies. For example, one movie might have an assistant director, and another movie might have an animal trainer. The developer needs to implement a solution to support the following use cases: For a given title and release year, get all details about the movie that has that title and release year. For a given title, get all details about all movies that have that title. For a given genre, get all details about all movies in that genre. Which data store configuration will meet these requirements?
Create an Amazon DynamoDB table. Configure the table with a primary key that consists of the title as the partition key and the release year as the sort key. Create a global secondary index that uses the genre as the partition key and the title as the sort key.
Create an Amazon DynamoDB table. Configure the table with a primary key that consists of the genre as the partition key and the release year as the sort key. Create a global secondary index that uses the title as the partition key.
On an Amazon RDS DB instance, create a table that contains columns for title, release year, and genre. Configure the title as the primary key.
On an Amazon RDS DB instance, create a table where the primary key is the title and all other data is encoded into JSON format as one additional column.
ユーザの投票
コメント(4)
- 正解だと思う選択肢: A
The correct answer is A. Amazon DynamoDB is suited for storing inconsistent attributes data across items. Option B is wrong. This solution does not help get items with the condition of the combination, title and release year.
👍 3Untamables2023/03/21 - 正解だと思う選択肢: A
Option A because we have to search on the basis of title so it is better to partition by title. Also we have to search by genre so it is good option to make GSI using genre as partition key
👍 2shahs102023/03/28 - 正解だと思う選択肢: A
It's A - I totally agree. It's a single appropriate solution. But in my opinion genre isn't a quite good option as GSI partition key - it isn't high distribution and we can get a hot partition.
👍 2Krok2023/04/05
シャッフルモード