DVA-C02 · Question #714
DVA-C02 Question #714: Real Exam Question with Answer & Explanation
The correct answer is A: Create a composite primary key. Set the user ID as the partition key and the timestamp as the. Using a composite primary key with the user ID as the partition key and the timestamp as the sort key enables efficient querying of user activities in chronological order. This strategy distributes data evenly across partitions by user ID and avoids hot partitions, maximizing thr
Question
An ecommerce company is developing a serverless application to track user activities. The company needs to track each type of activity with a timestamp and a unique product ID. The company also must track actions that are associated with each activity, such as product views, shopping cart actions, purchases, and checkout processes. The company is planning a marketing campaign based on each user's activity. A developer needs to implement a partitioning strategy for an Amazon DynamoDB table to meet the data storage and access requirements for the application. The strategy must maximize provisioned throughput efficiency while minimizing the risk of throttling. Which solution will meet these requirements?
Options
- ACreate a composite primary key. Set the user ID as the partition key and the timestamp as the
- BCreate a composite primary key. Set the product ID as the partition key and the associated
- CUse the product ID as the partition key. Create an Application Auto Scaling policy to update the
- DCreate an AWS Lambda function that adds a counter attribute that increases by one for each new
Explanation
Using a composite primary key with the user ID as the partition key and the timestamp as the sort key enables efficient querying of user activities in chronological order. This strategy distributes data evenly across partitions by user ID and avoids hot partitions, maximizing throughput and minimizing throttling.
Community Discussion
No community discussion yet for this question.