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 93 discussion

A developer is building an application that uses Amazon DynamoDB. The developer wants to retrieve multiple specific items from the database with a single API call.

Which DynamoDB API call will meet these requirements with the MINIMUM impact on the database?

  • A. BatchGetItem
  • B. GetItem
  • C. Scan
  • D. Query
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
MrTee
Highly Voted 2 years ago
Selected Answer: A
A Is the correct answer with the minimum impact on the database.
upvoted 12 times
...
dan80
Highly Voted 1 year, 12 months ago
Selected Answer: A
https://beabetterdev.com/2022/10/12/dynamodb-getitem-vs-query-when-to-use-what/#:~:text=If%20you'd%20like%20to%20retrieve%20multiple%20items%20at%20once,retrieve%20multiple%20items%20at%20once.
upvoted 9 times
jipark
1 year, 8 months ago
tons of thanks. Looking for just a single item on the main table index? Use GetItem Looking for just a single item on a GSI? Use Query. Looking for multiple items with different partition key and sort key combinations at once? Use BatchGetItem Looking for multiple items that share the same partition key? Use Query
upvoted 15 times
...
...
sumanshu
Most Recent 4 months ago
Selected Answer: A
B) Eliminated - The GetItem API retrieves only one specific item at a time by its primary key. C) Eliminated - The Scan API retrieves all items in a table or index by sequentially scanning every item. D) Eliminated - The Query API retrieves all items that match a specific partition key and optionally filters them by sort key or other criteria.
upvoted 1 times
sumanshu
2 months, 2 weeks ago
CustomerID OrderID OrderDetails 123 A001 Shoes 123 A002 Jacket 123 A003 Watch If you need to retrieve all orders for CustomerID = 123, a Query would work well because all the needed items share the same partition key
upvoted 1 times
sumanshu
2 months, 2 weeks ago
Suppose you need to retrieve multiple orders, but for different customers: CustomerID OrderID OrderDetails 123 A001 Shoes 456 B002 Laptop 789 C003 Phone Here, the partition keys are different (123, 456, 789). A Query won't work because it can only retrieve items for one partition key at a time. BatchGetItem is the best choice because it allows retrieving specific items across multiple partition keys in a single API call.
upvoted 1 times
...
...
...
Saudis
7 months, 2 weeks ago
A key word is retrieve multiple specific items
upvoted 1 times
...
65703c1
11 months, 1 week ago
Selected Answer: A
A is the correct answer.
upvoted 1 times
...
Moralles
1 year ago
Selected Answer: A
• GetItem: recupera um único item de uma tabela. • BatchGetItem: retorna até 100 itens de uma ou mais tabelas limitados a 16MB por chamada.
upvoted 1 times
...
prathameshpathak
1 year, 3 months ago
Selected Answer: A
...........................
upvoted 1 times
...
marolisa
1 year, 7 months ago
D. "Query" allows you to use filter - multiple specific items and is less expensive than the Sacan operation.
upvoted 1 times
...
Baba_Eni
1 year, 10 months ago
Selected Answer: A
https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchGetItem.html
upvoted 1 times
...
imvb88
1 year, 11 months ago
Selected Answer: A
Need specific Item -> cannot be Scan or Query since they are for retrieving items that match conditions. We need multiple item then A is the option left.
upvoted 2 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