AWS Certified Database – Specialty — Question 99

An electric utility company wants to store power plant sensor data in an Amazon DynamoDB table. The utility company has over 100 power plants and each power plant has over 200 sensors that send data every 2 seconds. The sensor data includes time with milliseconds precision, a value, and a fault attribute if the sensor is malfunctioning. Power plants are identified by a globally unique identifier. Sensors are identified by a unique identifier within each power plant. A database specialist needs to design the table to support an efficient method of finding all faulty sensors within a given power plant.
Which schema should the database specialist use when creating the DynamoDB table to achieve the fastest query time when looking for faulty sensors?

Answer options

Correct answer: D

Explanation

The correct answer is D because using the plant identifier as the partition key and the sensor identifier as the sort key allows for efficient retrieval of sensor data specific to each plant. This structure facilitates quick queries to identify faulty sensors. The other options either complicate the schema or do not optimize for the specific querying needs of finding faulty sensors within a power plant.