A database administrator is deploying a new database system that will primarily handle IoT sensor data. The data arrives continuously in small packets, and the system needs to support high-volume inserts with eventual consistency, prioritizing availability over strict consistency. Queries will mostly involve retrieving data for specific time ranges or aggregated values. Which database model is MOST suitable for this scenario?
- AGraph Database (e.g., Neo4j)
- BRelational Database (e.g., PostgreSQL)
- CKey-Value Store (e.g., Redis)
- DColumn-Family Database (e.g., Cassandra)
Show answer & explanationAnswer & explanation
Correct answer: D. Column-Family Database (e.g., Cassandra)
Column-family databases like Cassandra are designed for high-volume, continuous writes, horizontal scalability, and eventual consistency. They excel at handling time-series data (like IoT sensor data) where new data is appended, and queries often involve retrieving ranges of data or aggregations, fitting the 'small packets', 'high-volume inserts', 'eventual consistency', and 'time ranges/aggregated values' requirements perfectly.
Why the other options are wrong
- A. Graph databases are for highly interconnected data and complex relationship queries, not for high-volume, append-only time-series data with range-based analytics.
- B. Relational databases struggle with the extreme write volumes and horizontal scalability required for high-frequency IoT data and often prioritize strong consistency.
- C. Key-value stores are fast for simple reads/writes but lack the robust querying and aggregation capabilities needed for 'specific time ranges or aggregated values' on complex IoT data.
Column-Family Database
A NoSQL database that stores data in columns rather than rows, optimized for high write throughput, horizontal scalability, and efficient retrieval of specific columns across large datasets.
- Excellent for time-series and IoT data.
- Supports eventual consistency and high availability.
- Often used for Big Data analytics and real-time processing.
Memory trick: IoT streams need columns for speed, not rows or graphs indeed.