exam questions

Exam AWS Certified Developer - Associate DVA-C02 All Questions

View all questions & answers for the AWS Certified Developer - Associate DVA-C02 exam

Exam AWS Certified Developer - Associate DVA-C02 topic 1 question 130 discussion

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?

  • A. Perform a BatchGetltem operation that returns items from the two tables. Use the list of songName/artistName keys for the songs table and the list of artistName key for the artists table.
  • B. Create a local secondary index (LSI) on the songs table that uses artistName as the partition key. Perform a query operation for each artistName on the songs table that filters by the list of songName. Perform a query operation for each artistName on the artists table.
  • C. Perform a BatchGetitem operation on the songs table that uses the songName/artistName keys. Perform a BatchGetltem operation on the artists table that uses artistName as the key.
  • D. Perform a Scan operation on each table that filters by the list of songName/artistName for the songs table and the list of artistName in the artists table.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
csG13
Highly Voted 1 year, 10 months ago
Selected Answer: A
The correct answer is A. BatchGetItem can return one or multiple items from one or more tables. For reference check the link below https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchGetItem.html
upvoted 8 times
...
sumanshu
Most Recent 3 months, 4 weeks ago
Selected Answer: A
BatchGetItem allows fetching multiple items from one or more DynamoDB tables in a single call, which reduces network traffic. C) Eliminated - While each operation is efficient within its table, two separate BatchGetItem calls still result in more round trips to DynamoDB than a single batch operation for both tables D) Eliminated - Scan operations are very inefficient because they read every item in the table, even if only a subset of data is needed.
upvoted 2 times
...
65703c1
11 months, 1 week ago
Selected Answer: A
A is the correct answer.
upvoted 1 times
...
KarBiswa
1 year, 2 months ago
Selected Answer: C
I would go for it because typically we are taking the advantage of key selection
upvoted 1 times
NSA_Poker
7 months, 1 week ago
(C) performs BatchGetItem operation twice; that's NOT optimal and above the minimal network traffic necessary. Amazon DynamoDB BatchGetItem - returns the attributes of one or more items from one or more tables. You identify requested items by primary key.
upvoted 1 times
...
KarBiswa
1 year, 2 months ago
Sorry its Option A saying multiple songs so list will be right option
upvoted 1 times
...
...
SerialiDr
1 year, 3 months ago
Selected Answer: A
The BatchGetItem API allows you to get up to 100 items from one or more DynamoDB tables in a single operation, which can reduce the number of network requests. This is efficient for retrieving a specific list of items when you know the primary keys (partition key and sort key, if applicable) of the items you want to retrieve.
upvoted 4 times
...
norris81
1 year, 7 months ago
Selected Answer: A
https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchGetItem.html
upvoted 2 times
...
rlnd2000
1 year, 9 months ago
Selected Answer: B
Agree 100% with Caiyi.
upvoted 1 times
...
caiyi
1 year, 9 months ago
B. By creating a local secondary index (LSI) on the songs table with artistName as the partition key, you can efficiently query the songs table for each artistName in the list of artists. This approach allows you to retrieve the desired songs for multiple artists with minimal network traffic.
upvoted 3 times
GripZA
1 year, 8 months ago
You can't create a LSI on an existing DDB table
upvoted 6 times
...
remynick
1 year, 8 months ago
I dont agree, we need to creat a global secondary index to use artistName as the partition ke
upvoted 2 times
...
...
Baba_Eni
1 year, 10 months ago
Selected Answer: A
https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchGetItem.html
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago