QuestionQ51

VerifiedDevelopment with AWS Services

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?

Explanation

DynamoDB is ideal for schemas with inconsistent attributes across items. Using title and release year as the composite primary key ensures unique identification for the specific queries needed. A global secondary index on genre as partition key (with title as sort key) enables efficient genre-based queries. This design avoids hot partitions that would occur if genre were the primary partition key.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!