Skip to content

Databases: query paths and storage engines

Match access patterns to database families, compare scans with indexed lookups, and reason about B-tree and LSM write costs.

20 min7 steps

By the end you can
  • Choose a database family from access patterns and constraints
  • Compare full-scan and indexed query work including returned rows
  • Explain B-tree page updates and LSM flush and compaction
  • Calculate write amplification and explain its workload dependence

Start with the access pattern

Relational SQL

  • Relations, joins and constraints
  • Flexible indexed queries

Key-value / document

  • Key lookups / aggregate documents
  • Indexes depend on engine

Wide-column / graph

  • Partition-key and range access
  • Or relationship traversal

NoSQL covers multiple families, not one feature set. Key-value stores suit keyed access; documents group nested data; wide-column stores organize partitioned rows; graph databases emphasize relationships. SQL systems can also store JSON. Choose from query shape, invariants and operational needs.

A checkout system needs joins and enforced relational constraints across orders and line items. Which is the clearest starting point?

Answer this step to continue.