Model → query → plan → transaction

Data

From reading a first SQL query to execution plans, concurrent transactions, locks, and deliberate ORM boundaries.

Chapters
5
Learning tracks
2
PRODUCTION CASES
5

What this sphere covers

SQL foundations

queries · schema · ACID · constraints

02
  1. CHAPTER 14SQL from zero: reading and changing rowsStatement → clauses → result rows

    Learn to read SELECT, WHERE, INSERT, UPDATE, DELETE, NULL, parameters, sorting, and aggregation before advanced database topics.

  2. CHAPTER 15SQL foundations, ACID, and constraintsInvariant → transaction → durable state

    Use real PostgreSQL constraints, parameterized SQL, and a rollback to see where data integrity actually lives.

PostgreSQL in practice

EXPLAIN · isolation · JOIN · views

03
  1. CHAPTER 16PostgreSQL indexes and EXPLAINStatistics → plan → measured trade-off

    Build B-tree, Hash, BRIN, and GIN indexes, then compare a real EXPLAIN ANALYZE plan before and after indexing.

  2. CHAPTER 17Transaction isolation and lockingSnapshots → contention → conflict handling

    Open two real PostgreSQL sessions and compare Read Committed, Repeatable Read, SELECT FOR UPDATE, and optimistic versioning.

  3. CHAPTER 18JOINs, Materialized Views, and ORM boundariesData shape → round trips → freshness

    Inspect a real JOIN plan, reproduce N+1, and watch a Materialized View remain stale until REFRESH.