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.
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.
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.
Codd, relationships, keys
1NF → BCNF, denormalization
Entities, relationships, attributes
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.
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, the CAP theorem, consensus, and modern scaling approaches.
Leader-replica, multi-leader
Horizontal partitioning
Consistency, availability, network partition
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.
MongoDB, CouchDB
Redis, Memcached, DynamoDB
Cassandra, HBase
Neo4j, JanusGraph
Comparing NoSQL database types
Document database
Nested JSON/BSON documents with flexible schema and rich field-level queries.
Examples
Use cases
Data model
JSON/BSON documents
Query pattern
Field queries, indexes
Consistency
Tunable
Transactions
| Characteristic | Key-value | Document database | Wide-column store | Graph database |
|---|---|---|---|---|
| Scalability | Horizontal | Horizontal | Horizontal | Horizontal and vertical |
| Consistency | Eventual | Tunable | Tunable | Strong |
| Schema | Schemaless | Flexible | Flexible | Flexible |
| 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
- Database Selection Framework - Move from fundamentals to practical DBMS selection by workload profile and system 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, 2nd Edition (short summary) - Core theory on replication, partitioning, and consistency behind database architecture decisions.
- PostgreSQL: history, architecture and differences - Practical OLTP baseline with strong transaction semantics and mature ecosystem support.
- MySQL: history, storage engines, and scaling - Alternative OLTP path with different operational and scaling trade-offs.
- Replication and sharding - Operational patterns for growth: replication strategy, shard-key design, and rebalancing.
- CAP theorem - Why a network partition forces you to give up either availability or consistency — and where that choice surfaces in distributed databases.
- PostgreSQL from the inside (short summary) - Deep dive into MVCC, WAL, locking, and indexing internals in PostgreSQL.
- Database Internals (short summary) - How storage engines and data structures are built, and why they decide a DBMS's latency and throughput under real load.
