Amazon

DVA-C02 practice question 20

AWS Certified Developer - Associate (DVA-C02) · free question 20 of 20

Question

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?
  • A. 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. Correct
  • B. 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.
  • C. 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.
  • D. 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.

Explanation

Option A correctly configures an Amazon DynamoDB table with a composite primary key (title as partition key and release year as sort key) to support efficient retrieval of movie details by title and release year. Additionally, it creates a global secondary index with genre as the partition key and title as the sort key, enabling efficient queries for all movies within a specific genre.

Need the theory? Learn it free in the DVA-C02 course on Godlike Academy

Practice the whole free set

Answer all 20 free DVA-C02 questions with instant feedback, or unlock all 557 questions with Learn and Exam modes.