DBS-C01 · Question #139
A company's ecommerce website uses Amazon DynamoDB for purchase orders. Each order is made up of a Customer ID and an Order ID. The DynamoDB table uses the Customer ID as the partition key and the…
The correct answer is C. Recreate the table by using the latest snapshot while adding a local secondary index on Invoice. as Local secondary index can only be created while creating the Dynamodb table. and query needs to use third attribute on top of primary and sort key, so Local Secondary index has primary and sort key as well as the third attribute. Global secondary index can be created without…
Question
A company's ecommerce website uses Amazon DynamoDB for purchase orders. Each order is made up of a Customer ID and an Order ID. The DynamoDB table uses the Customer ID as the partition key and the Order ID as the sort key. To meet a new requirement, the company also wants the ability to query the table by using a third attribute named Invoice ID. Queries using the Invoice ID must be strongly consistent. A database specialist must provide this capability with optimal performance and minimal overhead. What should the database administrator do to meet these requirements?
Options
- AAdd a global secondary index on Invoice ID to the existing table.
- BAdd a local secondary index on Invoice ID to the existing table.
- CRecreate the table by using the latest snapshot while adding a local secondary index on Invoice
- DUse the partition key and a FilterExpression parameter with a filter on Invoice ID for all queries.
How the community answered
(54 responses)- A19% (10)
- B6% (3)
- C69% (37)
- D7% (4)
Explanation
as Local secondary index can only be created while creating the Dynamodb table. and query needs to use third attribute on top of primary and sort key, so Local Secondary index has primary and sort key as well as the third attribute. Global secondary index can be created without primary
Topics
Community Discussion
No community discussion yet for this question.