All articles

Our first field is databases and storage. Browse the reading below, or follow the relational and object-storage collections from their introductions into application design and operation. Drawing systems and processes teaches a practice that applies in every field. For practical examples, visit the playgrounds.

Search the full text of articles and guides →

Start here

Practice

  • SQL sandbox

    Explore PostgreSQL in your browser, with guided lessons from first queries to migrations, indexes and recovery reasoning.

  • Start the SQL practice

    Open a disposable PostgreSQL database and use the independent setup supplied by each article.

  • Object-storage sandbox

    Guided local models for requests, uploads, versions and application protocols.

  • Try the requests against S3

    A real-service worksheet for conditional writes and version recovery.

Facts and schema

  • Relational data modelling

    Design related tables by following the shop’s facts, keys and relationships through corrections, repeated occurrences and safe decomposition.

  • Normalisation and decomposition

    Derive candidate keys, prove a decomposition lossless, and choose between local enforcement and stronger normal forms.

  • Modelling hierarchies

    Store category trees and shared ancestry, follow recursive queries, and maintain adjacency lists, paths, closure tables and nested sets through the same subtree move.

  • Values, missing data and equality

    Choose SQL representations for amounts, times, text and identifiers, then follow missing information through comparisons, filters and uniqueness rules.

  • Constraints and data integrity

    Turn the shop’s rules into required values, checks, keys, references and exclusions, and recognise when enforcement needs a transaction protocol.

  • History, correction and deletion

    Keep effective and recorded time distinct, preserve purchase agreements through corrections, and carry retention and deletion through related records and external copies.

Reading and changing data

  • Joins and the meaning of a result row

    Predict matching, missing and multiplied rows, choose joins or existence tests, and build a still-due report from separate order totals.

  • Aggregates and window functions

    Choose grouped or per-row SQL calculations by following the rows that contribute: counts, filters, rankings, ties and window frames.

  • Pagination and consistent exports

    Continue through changing SQL results without losing timestamp ties, and choose what an export must preserve when rows change between batches.

  • Updates, upserts and bulk imports

    Make SQL changes conditional, choose what an existing key means, and follow a catalogue batch through rejection, committed chunks and a safe resume.

  • SQL at the application boundary

    Carry query meaning and transaction ownership through parameters, result mappings, relationship loading and reusable database connections.

Concurrency and external work

  • Transactions and isolation

    Choose the work that must commit together, then protect its decisions against other transactions through guarded stock, snapshots and a payment limit.

  • Locks, contention and deadlocks

    Choose the row that governs a concurrent decision, read it with a sound snapshot protocol, and understand lock waits, ordering and deadlocks.

  • Retries and uncertain commit outcomes

    Recover one logical purchase after an abort or a lost reply, using a stable request identity and an atomically recorded result.

  • Outboxes and database-backed jobs

    Commit an external intention with an order, then recover delivery and worker claims without confusing a retry with new work.

Work and storage

  • Query execution and performance

    Follow rows through scans, joins, grouping and sorting, then use a measured plan to diagnose repeated work and test an equivalent repair.

  • Indexes and access paths

    Derive index keys, bounds, ordering and covering from an order-history query, then judge their read savings against the cost of the workload.

  • Table partitioning and data lifecycle

    Choose table boundaries that exclude useful query work or retire a complete unit of data, while preserving identity, references and a safe maintenance path.

  • Storage and durability

    Follow a price change through pages, row versions, buffers and WAL, then distinguish durable commit and restart recovery from lost storage or an unwanted change.

Recovery and operation

  • Backup, restore and reconciliation

    Choose and test a recoverable history, restore the intended state, and account for later work and external effects without applying an operation twice.

  • Replicas, lag and read routing

    Follow a commit through replica receipt, durable storage and replay, then choose a read target that can meet the request’s freshness promise.

  • Failover and fencing

    Transfer write authority to a surviving copy, establish which commits it retains, and return the former primary without competing histories.

  • Diagnosing a database incident

    Follow a slow request through its connection pool, database waits and shared resources, then test a bounded intervention against useful service.

  • Live schema changes and backfills

    Move schema, data and callers through expand, migrate and contract; make a live backfill converge and preserve a deliberate return path.

  • Connections, overload and capacity

    Count connections, work and waiting separately; budget admission, handle overload and leave room to recover.

  • Database access and least privilege

    Follow a tenant request through its application and database identities, derive privileges from the work, and test the boundaries as the connections that use them.

Distributed SQL

  • Sharding and distributed SQL

    Choose a shard boundary from local work and shared rules, then follow routing, replica agreement and transactions across owners.

  • Transactions across partitions

    How a purchase obtains one recoverable outcome across data owners, and what prepared participants can do when their coordinator disappears.

  • Time, snapshots and distributed reads

    Choose one safe history across shards, understand what clocks and replica progress prove, and match historical reads to the decisions they can support.

  • Regional placement and survival

    Count surviving voters and follow a shop purchase across regions to find what a local request must wait for.

  • Rebalancing and cluster change

    Follow a live replica from base copy to voting membership, then budget the capacity and survival margin needed to move data and retire a node.

PostgreSQL

PostgreSQL specialist capabilities

  • Full-text search in PostgreSQL

    Turn catalogue text into lexemes, find indexed matches and rank eligible results, while keeping search configuration and stored representations in step.

  • Vector search in PostgreSQL

    Choose exact, HNSW or IVFFlat retrieval from filtered nearest-neighbour recall, measured query work and the cost of keeping vectors useful.

  • Types and extensions in PostgreSQL

    Express overlap and distance with suitable types and operators, then preserve extension-backed behaviour through installation, restore, updates and removal.

CockroachDB

Other database and storage approaches

Application caching

  • Application caching

    Follow a product card from its first source read to a cache hit, then see what changes when its price, traffic and memory needs change.

  • Deciding what and where to cache

    Follow the work a cached product card saves, compare local and shared copies, and test whether the benefit survives misses, changes and cold starts.

  • Cache keys

    Design keys and cached values that preserve an answer’s identity, representation and access context, including an explicit result for a missing product.

  • Freshness and invalidation

    Choose a freshness promise, follow delayed fills and missed invalidations, and decide when to expire, validate or bypass a cached answer.

  • Versioned cache fills

    Stop a delayed cache fill from undoing a processed invalidation, and test what happens when revision knowledge or fill permission disappears.

  • Handling cache misses

    Follow an expired answer through shared fills, deadlines and refreshes, then keep the database within its limits when the cache becomes cold or unavailable.

  • Cache memory and eviction

    Follow a changing request trace through a small cache, choose what enters and leaves, and measure the memory needed to save useful source work.

  • Caching with Redis

    Build and exercise a product cache with a real Redis client, bounded source reads, validated values and explicit failure handling.

  • Operating a cache

    Locate slow requests, explain extra source work, and rehearse cache changes and recovery without losing the answer's validity.

Object storage

Object storage · Objects and requests

Object storage · Building applications

Object storage · Operating the store

Object storage · Amazon S3

Drawing systems and processes

Assessments