A strong database guide matters not because it covers a lot, but because it pulls 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, partitioning, and on where simple theory ends and the architectural cost of a decision begins.
In interviews and architecture discussions, it helps most when you need to talk about databases without jumping between jargon and abstraction, and instead move steadily from data model to design consequences.
Practical value of this chapter
SQL vs NoSQL in 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/recovery planning, and degradation scenario handling.
Interview storytelling
Structure answers as engineering reasoning: context, options, trade-offs, final choice, and consequences.
Official source
Postgres Pro
Free electronic version of the book on the Postgres Professional website.
Guide to Databases
Authors: V. I. Komarov
Publisher: DMK Press, 2024
Length: 520 pages
Tutorial from PostgreSQL: relational model, SQL, DBMS architecture, distributed systems and NoSQL.
Why read this book?
The book is ideal for those who want:
- Get fundamental knowledge - understand the theoretical foundations of DBMS, from relational algebra to transactional processing
- Master SQL at a professional level - from basic queries to complex window functions and recursive CTEs
- Understand the architecture of the DBMS — how indexes, transactions, replication and distributed systems work
- Prepare for the interview - the book covers all database topics that are asked about System Design
Related chapter
PostgreSQL from the inside
Deep dive into MVCC, WAL, locks and PostgreSQL indexes from Egor Rogov.
Features of the book
Educational format
The book is written as a textbook with practical tasks, test questions and laboratory work. Ideal for self-study.
Relevance
Covers modern topics: NoSQL databases, distributed systems, big data processing, CAP theorem and eventual consistency.
Practical Focus
The theory is supported by examples in PostgreSQL. All concepts can be immediately put into practice with a real DBMS.
Free access
The book is available for free in electronic format on the Postgres Professional website - a quality resource without barriers.
Related chapter
Database Internals
Deep dive into B-Trees, LSM-Trees and distributed systems from Alex Petrov.
Book structure
Part I: Introduction to Databases
Fundamentals of database theory: from file systems to DBMS, relational model, normalization, ER diagrams and schema design.
Codd, relationships, keys
1NF → BCNF, denormalization
Entities, relationships, attributes
Logical and physical model
Part II: SQL Language
Complete SQL course: from SELECT to complex analytical queries, DDL/DML, window functions, CTE and query optimization.
SELECT, INSERT, UPDATE, DELETE
INNER, LEFT, RIGHT, FULL, CROSS
ROW_NUMBER, RANK, LAG, LEAD
WITH, recursive queries
Part III: DBMS Architecture
DBMS internals: data storage, indexes, buffer cache, transactions, locks and failure recovery.
Pages, heap, TOAST
B-Tree, Hash, GiST, GIN
ACID, isolation levels
Logging, checkpoint
Part IV: Distributed Systems
Replication, sharding, distributed transactions, CAP theorem, consensus and modern approaches to scaling.
Master-Slave, Master-Master
Horizontal partitioning
Consistency, Availability, Partition
Paxos, Raft, 2PC
Part V: NoSQL and Big Data
Alternatives to relational DBMS: document stores, key-value, column-family, graph databases and big data ecosystem.
MongoDB, CouchDB
Redis, Memcached, DynamoDB
Cassandra, HBase
Neo4j, JanusGraph
Сравнение типов NoSQL баз данных
Document Store
Документы (JSON/BSON) с вложенной структурой. Гибкая схема, богатые запросы по полям.
Примеры
Use Cases
Модель данных
JSON/BSON документы
Query Pattern
Запросы по полям, индексы
Consistency
tunable
Транзакции
| Характеристика | Key-Value | Document Store | Column-Family | Graph Database |
|---|---|---|---|---|
| Масштабирование | Horizontal | Horizontal | Horizontal | Both |
| Консистентность | eventual | tunable | tunable | strong |
| Схема | schemaless | flexible | flexible | flexible |
| Транзакции | ||||
| JOINs |
💡 Когда выбирать NoSQL вместо SQL?
- Key-Value: нужна максимальная скорость и простые lookup-операции
- Document: гибкая схема, nested data, эволюция структуры
- Column-Family: write-heavy workloads, time-series, огромные объёмы
- Graph: сложные связи между сущностями, многоуровневые обходы
Key Concepts for System Design
🔑Selecting a database type
- OLTP vs OLAP - different load patterns
- SQL vs NoSQL - trade-offs for different tasks
- Polyglot persistence - different databases for different data
- NewSQL - the best of both worlds
📊Indexing
- B-Tree for range queries and equality
- Hash for point lookups
- Composite indexes - column order is important
- Covering indexes - avoiding heap lookup
⚡Scaling
- Read replicas - read scaling
- Sharding - horizontal scaling
- Partitioning - managing large tables
- Connection pooling — PgBouncer, ProxySQL
🔒Consistency
- ACID - Transaction Guarantees
- Insulation levels - trade-off with performance
- Eventual consistency in distributed systems
- Saga pattern for distributed transactions
Who is this book for?
For beginners
Students and developers without database experience
Backend developers
To systematize knowledge and fill gaps
Preparing for an interview
Comprehensive coverage of database topics
About the authors
The book was written by a team of authors from the company Postgres Professional - a leading Russian developer of solutions based on PostgreSQL. The company is known for its contributions to the development of PostgreSQL and the creation of educational materials of the highest quality.
Verdict
The Database Guide is an excellent free resource for those who want to gain fundamental knowledge about databases in Russian. The book is especially valuable as a textbook: its structured presentation, practical tasks and relevant content make it an ideal choice for self-study. Recommended as a first step before diving into more specialized books like DDIA or Database Internals.
Related chapters
- Database Selection Framework - Move from fundamentals to a practical decision framework for choosing a DBMS by workload constraints.
- Why understand storage systems? - High-level map of storage models and where relational and NoSQL systems fit.
- Introduction to data storage - How storage choices shape API contracts, consistency semantics, and integration patterns.
- Designing Data-Intensive Applications (short summary) - Core theory on replication, partitioning, and consistency behind database architecture decisions.
- PostgreSQL: history, architecture and differences - Practical OLTP baseline with strong transactional guarantees and mature ecosystem support.
- MySQL: history, engines and scaling - Alternative OLTP path with distinct operational and scaling trade-offs.
- Replication and sharding - Operational patterns for scale growth: replication strategy, shard key design, and rebalancing.
- CAP theorem - Baseline model of availability/consistency trade-offs for distributed databases.
- PostgreSQL from the inside (short summary) - Deep dive into MVCC, WAL, locking, and indexing internals in PostgreSQL.
- Database Internals (short summary) - Storage engine internals and data structures that define latency and throughput behavior.
