System Design SpaceSystem Design Space
Back to table of contents

Databases

23 chapters

This page contains all chapters in this theme. Open chapters in sequence or use this page as a section map.

1

Why understand storage systems?

Original Contenteasy

Introductory chapter: Database types, data models, and storage tradeoffs.

Open chapter
2

Introduction to Data Storage

Original Contenteasy

A concise guide to the evolution of state storage approaches: from files and OLTP to NoSQL, NewSQL, and HTAP, and how these choices shape API contracts.

Open chapter
3

Database Selection Framework

Original Contentmedium

A practical framework for choosing a DBMS for a task: OLTP vs OLAP, read/write profile, consistency, replication, sharding and operational risks.

Open chapter
4

Guide to Databases (short summary)

Book Summarymedium

Tutorial from PostgreSQL: relational model, SQL, DBMS architecture, distributed systems and NoSQL.

Open chapter
5

Redis: in-memory database and architecture

Original Contentmedium

In-memory key-value system: event loop execution, data structures, durability modes (RDB/AOF), replication, Sentinel, and Redis Cluster.

Open chapter
6

PostgreSQL: history and architecture

Original Contentmedium

History of PostgreSQL, key features (MVCC, WAL, extensibility), architecture and comparison with MySQL.

Open chapter
7

MySQL: history, engines and scaling

Original Contentmedium

History of MySQL, participation in the LAMP stack, evolution of storage engines and approaches to scaling (Cluster, Vitess).

Open chapter
8

MongoDB: history and consistency

Original Contentmedium

Evolution of MongoDB from NoSQL to transactions: read/write concerns, default changes and current guarantees.

Open chapter
9

Cassandra: architecture and trade-offs

Original Contentmedium

History of Apache Cassandra, masterless architecture, tunable consistency and LSM-like storage.

Open chapter
10

NewSQL: TiDB, CockroachDB, and YDB

Original Contentmedium

A consolidated NewSQL chapter: SQL + ACID on distributed architecture, practical comparison of TiDB, CockroachDB, and YDB, and selection guidance by workload.

Open chapter
11

YDB: distributed SQL database and architecture

Original Contentmedium

Distributed SQL DBMS: auto-sharding tablets, ACID/serializable transactions, row/column tables, and shared-nothing horizontal scaling.

Open chapter
12

CockroachDB: distributed SQL database and architecture

Original Contentmedium

Distributed SQL DBMS: SQL + ACID on top of distributed KV, ranges/leaseholders, Raft replication, multi-region locality, and automatic rebalancing.

Open chapter
13

ClickHouse: analytical DBMS and architecture

Original Contentmedium

Column-oriented OLAP DBMS: MergeTree, partitioning, replication, materialized views and high-throughput analytics scenarios.

Open chapter
14

DuckDB: embedded OLAP database and architecture

Original Contentmedium

In-process analytical DBMS: vectorized execution, columnar storage, ACID transactions, Parquet/CSV interoperability, and embedded ELT workflows.

Open chapter
15

Elasticsearch: search engine and architecture

Original Contentmedium

Distributed search and analytics engine built on Apache Lucene: indexes, sharding, replicas, relevance and near real-time search.

Open chapter
16

Time Series Databases (TSDB): types, trade-offs, and selection

Original Contentmedium

Practical TSDB map: native engines, SQL extensions, distributed-storage-backed designs, and columnar databases used for time-series workloads.

Open chapter
17

Prometheus: history and architecture

Original Contentmedium

Prometheus from a system design perspective: timeline, layered architecture, write/read flow, and a practical DDL-like/DML-like model for monitoring workloads.

Open chapter
18

VictoriaMetrics: history and architecture

Original Contentmedium

VictoriaMetrics from a system design perspective: timeline, layered architecture, write/read flow, and a practical DDL-like/DML-like model for monitoring at scale.

Open chapter
19

Neo4j: graph database and architecture

Original Contentmedium

Graph DBMS with property graph model: Cypher, constraints/indexes, cluster read/write paths, and relationship-centric system design use cases.

Open chapter
20

Qdrant: vector database and architecture

Original Contentmedium

Vector database for semantic and hybrid retrieval: collections/points, payload filters, HNSW indexing, distributed mode, and consistency controls.

Open chapter
21

Database Internals: A Deep Dive (short summary)

Book Summaryhard

Analysis of the book by Alex Petrov: B-Trees, LSM-Trees, transactions, replication, consensus and the internal structure of the DBMS.

Open chapter
22

PostgreSQL from the inside (short summary)

Book Summaryhard

Analysis of Egor Rogov's book: MVCC, buffer cache, WAL, locks, query planner and PostgreSQL index types.

Open chapter
23

Cassandra: The Definitive Guide (short summary)

Book Summaryhard

Wide Column Store: Bigtable + Dynamo architecture, tunable consistency, LSM-Tree, Gossip Protocol. AP (CAP) and PA/EL (PACELC) classification.

Open chapter