Databases
Section titled “Databases”Data modeling, persistence, consistency, queries, migrations, and operational trade-offs.
Entries (5)
Indexes and query planningUse indexes to turn scans into targeted lookups, and understand how the query planner decides whether an index helps.
Isolation levels and concurrency anomaliesChoose how much concurrent transactions can observe of each other, and understand the read and write anomalies each level allows.
Normalization versus denormalizationDecide between one authoritative copy of each fact and a redundant copy shaped for a read, based on the invariants and access patterns that matter.
Optimistic versus pessimistic concurrency controlDecide whether to detect conflicts at commit time or prevent them by locking first, based on contention and the cost of a retry.
Transactions and consistency boundariesGroup operations so they commit as one atomic unit and preserve the invariants that define a valid database state.