A utility collects smart meter readings in a flexible schema, and some meters add extra fields over time. Lookups need to be fast by meter ID and reading time. Which option is most appropriate?
Show answer and explanation
Answer: D
Table Storage and the Cosmos DB Table API store entities that can carry different properties, which suits a flexible schema. Using the meter ID as the partition key and the reading time as the row key supports efficient lookups by those fields at large volume. Relational tables need a fixed schema, while queues carry messages rather than queryable records.
Why the other options are wrong
- A. SQL Database enforces a fixed table schema, so varying meter fields would require altering tables. It is not the flexible key-value option the scenario needs.
- B. Daily blob files would require downloading and scanning content to find readings. That is slow for lookups by meter and time.
- C. Queue Storage delivers messages for processing and removes them once consumed. It does not serve as a store for querying readings by meter and time.