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.
Explanations:
This configuration allows retrieval of a movie by both title and release year, fulfilling the requirement for a specific movie. The global secondary index on genre enables efficient queries to get all movies of a particular genre. It also supports retrieving all movies with the same title through the primary key structure.
This option uses genre as the primary partition key, which does not satisfy the requirement to retrieve movies by title and release year effectively. The global secondary index on title would allow for querying by title, but it does not support the specific requirement of querying by both title and release year together.
This configuration does not allow querying by genre directly since the primary key is only title. While it can retrieve a movie by title, it cannot retrieve all movies by genre or handle cases where the same title exists with different release years efficiently.
While this option allows for flexibility in storing inconsistent properties as JSON, it does not provide an effective way to retrieve movies by title and release year, as both are needed to uniquely identify a movie. Moreover, querying based on genre would be inefficient since the data is not structured for that purpose.