nerdexam
AmazonAmazon

DEA-C01 · Question #267

DEA-C01 Question #267: Real Exam Question with Answer & Explanation

The correct answer is C: Create a global secondary index (GSI) that uses DriverID as the partition key and RideStatus as. To let drivers efficiently query only their completed rides, you need a global secondary index (GSI) with DriverID as the partition key (so queries can be targeted per driver) and RideStatus as the sort key (so you can query for “Completed” rides without scanning the full table).

Data Store Management

Question

A ride-sharing company stores records for all rides in an Amazon DynamoDB table. The table includes the following columns and types of values: The table currently contains billions of items. The table is partitioned by RideID and uses TripStartTime as the sort key. The company wants to use the data to build a personal interface to give drivers the ability to view the rides that each driver has completed, based on RideStatus. The solution must access the necessary data without scanning the entire table. Which solution will meet these requirements?

Options

  • ACreate a local secondary index (LSI) on DriverID.
  • BCreate a global secondary index (GSI) that uses RiderID as the partition key and RideStatus as
  • CCreate a global secondary index (GSI) that uses DriverID as the partition key and RideStatus as
  • DCreate a filter expression that uses RiderID and RideStatus.

Explanation

To let drivers efficiently query only their completed rides, you need a global secondary index (GSI) with DriverID as the partition key (so queries can be targeted per driver) and RideStatus as the sort key (so you can query for “Completed” rides without scanning the full table). This avoids costly scans and supports fast, targeted lookups at scale.

Topics

#DynamoDB#Global Secondary Index (GSI)#Data Modeling#Query Optimization

Community Discussion

No community discussion yet for this question.

Full DEA-C01 PracticeBrowse All DEA-C01 Questions