#databases
10 articles
Design a Globally-Distributed SQL Database (Spanner / CockroachDB)
SQL transactions that are ACID across continents. How Spanner shards into Paxos groups, runs 2PC on top, and uses TrueTime to give you external consistency — the CP counterpart to Dynamo.
Storage Engines: LSM-Trees vs B-Trees
Why does Postgres read fast and Cassandra write fast? The two storage-engine families that underpin every database — and their write/read/space amplification trade-offs.
Database Indexing
B-trees, LSM-trees, hash indexes, covering indexes, partial indexes — what they do, when they hurt, and how to read an EXPLAIN plan with confidence.
Database Replication
Single-leader, multi-leader, and leaderless replication. Sync vs async, replication lag, conflict resolution, and how each model trades availability for consistency.
Bloom Filters
A tiny, probabilistic data structure that says "definitely not" or "maybe" — and saves billions of disk reads. The math, the tuning, and where every big system uses one.
How to Choose a Database
A decision framework for picking the right database. Workload shape, access patterns, consistency needs, and the operational costs nobody warns you about.
SQL vs NoSQL — How to Actually Choose
A practical decision guide. When relational wins, when document wins, when neither is right, and the lazy "use Postgres" advice that's mostly correct.
CAP Theorem Deep Dive
The CAP theorem, debunked myths, PACELC, and the actual trade-offs every distributed database makes.
Database Sharding
When you outgrow a single database — how to split data across many machines, the strategies that work, and the operational pain you'll inherit.
Databases — SQL, NoSQL, NewSQL
Indexes, transactions, isolation levels, MVCC, WAL, LSM trees vs B-trees, replication, sharding, and the trade-offs that decide where your data lives.