8 parts · 14 chapters

Formal Database Theory

The maths that makes every other database course non-arbitrary: why the optimiser may reorder your joins, why BCNF sometimes cannot preserve dependencies, why snapshot isolation allows write skew, why 2PC blocks, and why R + W > N. Proofs appear where they change a design decision; everything else is stated with intuition and a runnable example.

Eight parts: the relational model; relational algebra and calculus; functional dependencies and normalisation through 6NF and when to denormalise; query processing theory; concurrency theory from schedules to SSI; distributed theory from CAP to CRDTs; the data structures behind storage; and the theory you will actually cite (Adya's isolation definitions, vendor differences, Jepsen). The capstone is a working relational algebra interpreter and functional-dependency analyser in TypeScript whose real output is shown throughout.

the relational model · relational algebra and calculus · functional dependencies and normalisation · query processing theory · concurrency theory · distributed theory · data structures behind storage · theory you will citesenior → staff · backend and database engineers
modelRelations, keys, NULL and the gap between SQL and Codd.
algebraOperators, equivalences and what SQL cannot express.
designFDs, closures, keys, normal forms, lossless decomposition.
queriesContainment, join ordering, cardinality, worst-case optimal joins.
transactionsSerialisability, 2PL, SI, write skew, SSI.
distributionCAP, PACELC, consistency models, FLP, quorums, CRDTs, 2PC.
Built on Postgres, NoSQL and Distributed SystemsThe formal layer under the Postgres, ORM, NoSQL, Algorithms and Distributed Systems courses; uses Discrete Maths for sets, relations and logic.