Data foundations

Как устроены данные под капотом любой СУБД: движки хранения (B-дерево и LSM), OLTP против OLAP, эволюция схем, репликация, секционирование, производные данные и потоковая обработка. Теория, на которую опираются выбор и настройка конкретной базы.

Why it matters. Before choosing between PostgreSQL, MongoDB and ClickHouse, it helps to know how they differ inside: how they write to disk, how they spread data across nodes, and why some are fast at writes while others are fast at analytics. This section is the theory behind the comparison of specific databases and behind tuning PostgreSQL. Part of the training program.

Seven articles in order: from one machine to many, from writing to disk to streams of changes. You don't have to read them back to back, but each one builds on the previous.

Articles in the section

  1. B-trees and LSM trees — what happens on disk when a database saves a row: the log, SSTables, compaction, WAL.
  2. OLTP and OLAP — two different worlds of working with data: the warehouse, the star schema, columnar storage.
  3. Schema evolution — changing the data format without breaking anything: backward and forward compatibility.
  4. Replication models — why a replica lags, what multi-leader buys you, and how quorums are counted.
  5. Partitioning (sharding) — how to split data across nodes without creating a hot spot.
  6. Derived data — why a cache, an index and a read model are essentially the same thing.
  7. Stream processing — change data capture (CDC), windows and time in streams.