Databases
23 chaptersThis page contains all chapters in this theme. Open chapters in sequence or use this page as a section map.
Why understand storage systems?
Original ContenteasyIntroductory chapter: Database types, data models, and storage tradeoffs.
Open chapterIntroduction to Data Storage
Original ContenteasyA 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 chapterDatabase Selection Framework
Original ContentmediumA practical framework for choosing a DBMS for a task: OLTP vs OLAP, read/write profile, consistency, replication, sharding and operational risks.
Open chapterGuide to Databases (short summary)
Book SummarymediumTutorial from PostgreSQL: relational model, SQL, DBMS architecture, distributed systems and NoSQL.
Open chapterRedis: in-memory database and architecture
Original ContentmediumIn-memory key-value system: event loop execution, data structures, durability modes (RDB/AOF), replication, Sentinel, and Redis Cluster.
Open chapterPostgreSQL: history and architecture
Original ContentmediumHistory of PostgreSQL, key features (MVCC, WAL, extensibility), architecture and comparison with MySQL.
Open chapterMySQL: history, engines and scaling
Original ContentmediumHistory of MySQL, participation in the LAMP stack, evolution of storage engines and approaches to scaling (Cluster, Vitess).
Open chapterMongoDB: history and consistency
Original ContentmediumEvolution of MongoDB from NoSQL to transactions: read/write concerns, default changes and current guarantees.
Open chapterCassandra: architecture and trade-offs
Original ContentmediumHistory of Apache Cassandra, masterless architecture, tunable consistency and LSM-like storage.
Open chapterNewSQL: TiDB, CockroachDB, and YDB
Original ContentmediumA consolidated NewSQL chapter: SQL + ACID on distributed architecture, practical comparison of TiDB, CockroachDB, and YDB, and selection guidance by workload.
Open chapterYDB: distributed SQL database and architecture
Original ContentmediumDistributed SQL DBMS: auto-sharding tablets, ACID/serializable transactions, row/column tables, and shared-nothing horizontal scaling.
Open chapterCockroachDB: distributed SQL database and architecture
Original ContentmediumDistributed SQL DBMS: SQL + ACID on top of distributed KV, ranges/leaseholders, Raft replication, multi-region locality, and automatic rebalancing.
Open chapterClickHouse: analytical DBMS and architecture
Original ContentmediumColumn-oriented OLAP DBMS: MergeTree, partitioning, replication, materialized views and high-throughput analytics scenarios.
Open chapterDuckDB: embedded OLAP database and architecture
Original ContentmediumIn-process analytical DBMS: vectorized execution, columnar storage, ACID transactions, Parquet/CSV interoperability, and embedded ELT workflows.
Open chapterElasticsearch: search engine and architecture
Original ContentmediumDistributed search and analytics engine built on Apache Lucene: indexes, sharding, replicas, relevance and near real-time search.
Open chapterTime Series Databases (TSDB): types, trade-offs, and selection
Original ContentmediumPractical TSDB map: native engines, SQL extensions, distributed-storage-backed designs, and columnar databases used for time-series workloads.
Open chapterPrometheus: history and architecture
Original ContentmediumPrometheus from a system design perspective: timeline, layered architecture, write/read flow, and a practical DDL-like/DML-like model for monitoring workloads.
Open chapterVictoriaMetrics: history and architecture
Original ContentmediumVictoriaMetrics from a system design perspective: timeline, layered architecture, write/read flow, and a practical DDL-like/DML-like model for monitoring at scale.
Open chapterNeo4j: graph database and architecture
Original ContentmediumGraph DBMS with property graph model: Cypher, constraints/indexes, cluster read/write paths, and relationship-centric system design use cases.
Open chapterQdrant: vector database and architecture
Original ContentmediumVector database for semantic and hybrid retrieval: collections/points, payload filters, HNSW indexing, distributed mode, and consistency controls.
Open chapterDatabase Internals: A Deep Dive (short summary)
Book SummaryhardAnalysis of the book by Alex Petrov: B-Trees, LSM-Trees, transactions, replication, consensus and the internal structure of the DBMS.
Open chapterPostgreSQL from the inside (short summary)
Book SummaryhardAnalysis of Egor Rogov's book: MVCC, buffer cache, WAL, locks, query planner and PostgreSQL index types.
Open chapterCassandra: The Definitive Guide (short summary)
Book SummaryhardWide Column Store: Bigtable + Dynamo architecture, tunable consistency, LSM-Tree, Gossip Protocol. AP (CAP) and PA/EL (PACELC) classification.
Open chapter