System Design Space
Knowledge graphSettings

Updated: June 24, 2026 at 3:37 PM

Guide to Databases (short summary)

medium

A strong database guide matters not because it covers a lot, but because it turns relational theory, SQL, and distributed trade-offs into one usable engineering language.

In real work, the book is valuable as a calm foundation: it helps teams align on data modeling, transactions, replication, sharding, and where simple theory turns into architectural cost.

In interviews and architecture discussions, it helps you talk about databases without jumping between jargon and abstraction: from data model to queries, guarantees, and design consequences.

Practical value of this chapter

Relational and NoSQL practice

Convert theory into concrete criteria for model selection: transactionality, schema flexibility, and access patterns.

Trade-off language

Use one consistent vocabulary for replication, partitioning, and consistency discussions across teams.

Adoption checklist

Pair architecture decisions with observability, backup and recovery planning, and degradation scenario handling.

Interview storytelling

Structure answers as engineering reasoning: context, options, trade-offs, final choice, and consequences.

Decision frame and editorial focus

Chapter focus

systematic overview of relational and NoSQL storage approaches

Workload profile

Start from the data profile: source of truth, OLTP, analytics, search, cache, and event-stream responsibilities.

Good fit

Use this chapter as the entry frame: it sets reading order before jumping to a favorite database engine.

Boundary and risk

The main risk is mixing taxonomy, technology choice, and operational guarantees into one implicit recommendation.

Connect next

Connect conclusions to the database-selection framework, DDIA, and practical engine overviews.

Official source

Postgres Pro

Free electronic version of the book on the Postgres Professional website, available without purchase or registration.

Download for free

Guide to Databases

Authors: V. I. Komarov
Publisher: DMK Press, 2024
Length: 520 pages

Postgres Pro textbook on relational modeling, SQL queries, DBMS architecture, indexes, transactions, replication, sharding, and NoSQL approaches.

Original

Why read this book?

The book pulls scattered topics into one picture: from data modeling and SQL to the distributed concerns you hit in system design once a single node stops being enough.

  • Understand the foundations - relational algebra, normal forms, transactions, and the role of a DBMS
  • Read and write SQL with confidence - from basic selects to window functions, CTEs, and recursive queries
  • See how databases work inside - indexes, transactions, write-ahead logging, locks, and recovery
  • Prepare for system design discussions - talk about databases through properties, constraints, and consequences

Related chapter

PostgreSQL from the inside

Deep dive into MVCC, WAL, locks, and PostgreSQL indexes by Egor Rogov.

Читать обзор

What makes the book useful

Educational format

The material is built as a course: exercises, review questions, and labs. The entry barrier is lower, and topics stick because you practice them, not just read them.

Relevance

Beyond relational theory and SQL, the book reaches NoSQL databases, distributed systems, big data processing, the CAP theorem, and eventual consistency.

Practical Focus

Every concept — schema design, indexes, transactions, queries — comes with PostgreSQL examples, so you can test the idea against a real DBMS instead of taking it on faith.

Free access

The electronic edition is free on the Postgres Professional website, which makes it a useful shared study resource for teams.

Related chapter

Database Internals

Deep dive into B-Trees, LSM trees, and distributed storage systems by Alex Petrov.

Читать обзор

Book structure

Part I: Introduction to Databases

Fundamentals of database theory: the path from file systems to DBMSs, relational modeling, normalization, ER diagrams, and schema design.

Relational model

Codd, relationships, keys

Normalization

1NF → BCNF, denormalization

ER modeling

Entities, relationships, attributes

Design

Logical and physical model

Part II: SQL Language

Full SQL path: from SELECT to analytical queries, DDL/DML, window functions, CTEs, and basic query optimization.

DML operations

SELECT, INSERT, UPDATE, DELETE

JOIN and subqueries

INNER, LEFT, RIGHT, FULL, CROSS

Window functions

ROW_NUMBER, RANK, LAG, LEAD

CTE and recursion

WITH, recursive queries

Part III: DBMS Architecture

DBMS internals: data storage, indexes, buffer cache, transactions, locks and failure recovery.

Data storage

Pages, heap, TOAST

Indexes

B-Tree, Hash, GiST, GIN

Transactions

ACID, isolation levels

WAL and recovery

Logging, checkpoint

Part IV: Distributed Systems

Replication, sharding, distributed transactions, the CAP theorem, consensus, and modern scaling approaches.

Replication

Leader-replica, multi-leader

Sharding

Horizontal partitioning

CAP theorem

Consistency, availability, network partition

Consensus

Paxos, Raft, 2PC

Part V: NoSQL and Big Data

Alternatives to relational DBMSs: document, key-value, wide-column, and graph databases, plus the big data ecosystem.

Document databases

MongoDB, CouchDB

Key-Value

Redis, Memcached, DynamoDB

Wide-column stores

Cassandra, HBase

Graph databases

Neo4j, JanusGraph

Comparing NoSQL database types

Document database

Nested JSON/BSON documents with flexible schema and rich field-level queries.

Examples

MongoDBCouchDBFirestoreElasticsearch

Use cases

CatalogsCMSUser profilesEvent logs

Data model

JSON/BSON documents

Query pattern

Field queries, indexes

Consistency

Tunable

Transactions

CharacteristicKey-valueDocument databaseWide-column storeGraph database
ScalabilityHorizontalHorizontalHorizontalHorizontal and vertical
ConsistencyEventualTunableTunableStrong
SchemaSchemalessFlexibleFlexibleFlexible
Transactions
JOINs

💡 When should NoSQL be considered instead of SQL?

  • Key-value: you need maximum speed and simple key-based operations
  • Document database: you need flexible schema, nested structures, and fast model evolution
  • Wide-column store: write volume, time-series data, and very large scale dominate
  • Graph database: the hard part is relationships and multi-hop traversal

Key Concepts for System Design

🔑Selecting a DBMS type

  • short transactions (OLTP) and analytics (OLAP) want different schemas and different hardware
  • SQL vs NoSQL is a choice of trade-off, not of fashion
  • polyglot persistence separates data contours but adds failure points in operations
  • NewSQL gives a SQL interface with horizontal scaling — at the cost of ecosystem maturity

📊Indexing

  • B-Tree covers range queries and equality lookups
  • hash indexes win on point lookups but are useless for ranges
  • in a composite index, column order decides whether it fires at all
  • a covering index removes the base-table read — at the cost of index size

Scaling

  • read replicas absorb read load but add replication lag
  • sharding scales write volume and data size horizontally — and complicates cross-shard queries
  • partitioning keeps large tables manageable
  • connection pooling reduces connection overhead: PgBouncer, ProxySQL

🔒Consistency

  • ACID defines baseline transaction guarantees
  • an isolation level is an explicit trade of correctness for performance
  • in a distributed system, strong consistency gives way to eventual
  • the Saga pattern splits a distributed transaction into steps with compensations instead of rollback

Who is this book for?

For beginners

Students and developers who need a systematic foundation in DBMS concepts

Backend developers

To organize existing experience and fill gaps around SQL, indexes, and transactions

Interview preparation

To discuss storage choice, consistency, and scaling with confidence in a System Design round

About the authors

The book was written by authors from Postgres Professional, a Russian company focused on PostgreSQL-based solutions. The team is known for its PostgreSQL contributions, educational materials, and practical database implementation experience.

What to remember

Guide to Databases is the foundation you read before more specialized material. It does not replace DDIA or Database Internals, but it gives you a common language for data models, SQL, indexes, transactions, and distributed trade-offs. With that language, you choose a DBMS by the constraints of the task instead of habit or tool popularity.

Related chapters

Where to find the book

Enable tracking in Settings