Database Detective Game
Investigate IoT data clues and choose the database model that best fits the workload.
Database Detective: read the IoT clues before you pick the database.
Step through each case file, inspect the workload evidence, shortlist the database suspects, and issue a verdict. The goal is not to memorize product names. It is to match the dominant data shape and query pattern to the model that handles it cleanly.
Case file
Read the briefing, then use Play or Step to walk through the evidence board.
Loading case file...
Detective Controls
Run the investigation, change cases, then check your verdict.
Select a database suspect, then check the verdict.
Hint: start with the most frequent query, then use the warning signs to rule out weaker fits.
Database Suspects
Pick one model. The fit bars are shown after the evidence stage so learners can compare before answering.
Suspect Fit Ranking
Scores are teaching weights for this case. They are not benchmark claims or vendor recommendations.
Database selection cheat sheet
- Time-series: timestamped telemetry, append-heavy writes, time-window queries, downsampling, and retention policies.
- Key-value: latest state, cache, session, feature flag, or sub-10 ms lookup where the key is already known.
- Document: flexible nested records, varied device models, and whole-document reads without many cross-document joins.
- Relational: ACID transactions, constraints, audits, joins, billing, inventory, and structured compliance reports.
- Graph: multi-hop relationship traversal such as network topology, dependency impact, route reachability, and downstream effects.
CAP theorem guardrails
CAP applies to distributed systems during a network partition. In that moment, the system must favor consistency or availability. CA is only realistic when partitions are outside the model, such as a single-node system or a tightly controlled non-distributed deployment.
- Use a CP leaning when wrong data is worse than temporary rejection, such as money, inventory, or safety interlocks.
- Use an AP leaning when stale data is acceptable for a short time, such as dashboards, caches, or local read-mostly state.
- Do not assume a database category always fixes CAP. Deployment topology and configuration matter.
Common detective mistakes
- Choosing time-series only because data has timestamps. If the main query is a join or transaction, timestamps are not enough.
- Choosing key-value for high speed when history and time-window analysis are required.
- Choosing document for flexibility when the real problem is relationship traversal.
- Choosing graph because devices form a network, even though the workload only stores periodic readings.
How the workload math is estimated
The game estimates raw ingest as devices x events per minute per device / 60 writes per second.
Raw daily data uses writes per second x 86400 x payload KB / 1,000,000 GB/day.
Real deployments add indexes, compression, replication, metadata, and retention rules.