DVA-C02 · Question #145
DVA-C02 Question #145: Real Exam Question with Answer & Explanation
The correct answer is A: Perform a BatchGetltem operation that returns items from the two tables. Use the list of. BatchGetItem can return one or multiple items from one or more tables. https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchGetItem.html
Question
A developer is working on a web application that uses Amazon DynamoDB as its data store. The application has two DynamoDB tables: one table that is named artists and one table that is named songs. The artists table has artistName as the partition key. The songs table has songName as the partition key and artistName as the sort key. The table usage patterns include the retrieval of multiple songs and artists in a single database operation from the webpage. The developer needs a way to retrieve this information with minimal network traffic and optimal application performance. Which solution will meet these requirements?
Options
- APerform a BatchGetltem operation that returns items from the two tables. Use the list of
- BCreate a local secondary index (LSI) on the songs table that uses artistName as the partition key.
- CPerform a BatchGetitem operation on the songs table that uses the songName/artistName keys.
- DPerform a Scan operation on each table that filters by the list of songName/artistName for the
Explanation
BatchGetItem can return one or multiple items from one or more tables. https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchGetItem.html
Community Discussion
No community discussion yet for this question.