Data Architecture

General material on structuring, storing and governing data.

10Questions
31Flashcards
25Terms
1Deliverables
Questions

10 to work through

  1. intermediate

    A dashboard query that took 200ms now takes 40 seconds. The table has grown to 200 million rows. Walk me through diagnosis and fix, including what you would not do.

    3 min answer
  2. intermediate

    A product catalogue page does 40,000 reads per second against a database that can serve 5,000. Walk me through the caching design, including what happens at 3 AM when the cache is empty.

    2 min answer
  3. intermediate Multiple choice

    A service writes to its database and then publishes an event to Kafka. Sometimes consumers see an event for a record that does not exist, and sometimes a record exists with no event. Why, and how do you fix it?

    2 min answer
  4. intermediate

    A visual discovery platform serves enormous read volume over user-curated collections, with writes that are rare by comparison. A team proposes sharding the primary database immediately. What lower-complexity options should be evaluated first, and what evidence would justify sharding?

    2 min answer
  5. advanced

    A B2B commerce platform aggregates inventory from many suppliers whose feeds arrive asynchronously with different frequencies and reliability. How should stale inventory, safety stock, reconciliation and supplier failures be handled?

    2 min answer
  6. advanced

    A feed-ranking system needs embeddings, counters and aggregates pushed from offline jobs to an online store at very high write throughput. How should such a derived-data serving system handle full rebuilds, incremental updates, versioning and reads during a swap?

    2 min answer
  7. advanced

    A multi-tenant SaaS product has outgrown one database. You must shard. How do you choose the partition key, and what makes this decision so expensive to get wrong?

    2 min answer
  8. advanced

    Discord stores trillions of messages. What is their partition key, and what problem does the second half of it solve?

    2 min answer
  9. advanced

    Netflix personalises an entire home page in the time a TV takes to draw a screen. How, given that scoring every title for every member on request is impossible?

    2 min answer
  10. advanced Multiple choice

    Uber indexes the world with hexagons rather than squares for surge pricing and dispatch. Why does the shape matter, and what is the general lesson?

    2 min answer
Terminology

25 terms in this topic

tool

Bloom Filter

A compact probabilistic structure that answers "is this key definitely absent, or possibly present?" — no false negatives, tunable false positives.

concept

Cache Invalidation

The problem of removing or refreshing cached data when the underlying source changes, and the reason caching is harder than it looks.

pattern

Change Data Capture

Publishing a stream of a database's row-level changes by reading its replication log, without modifying the application that owns it.

practice

Claim Provenance

Storing every externally sourced value with its timestamp, its source and a confidence derived from that source's history - so that downstream decisi…

pattern

CQRS

Separating the model used to change state from the model used to read it, so each can be optimised independently.

concept

Data Lakehouse

A pattern that puts warehouse-style transactions, schema and governance on top of cheap open-format object storage.

concept

Data Mesh

An organisational approach that gives domain teams ownership of their analytical data as a product, with a self-serve platform and federated governance.

practice

Data Retention Policy

A defined rule for how long each class of data is kept, where, and what happens at the end of it.

concept

Database Index

A secondary structure that lets the engine find rows without scanning, trading write cost and storage for read speed.

practice

Denormalisation

Deliberately duplicating data across records to make reads cheap, accepting the write-time cost of keeping copies in step.

case-study

Discord's Message Store Migrations

Discord moved from MongoDB to Cassandra to ScyllaDB as message volume grew from millions to trillions, each time for a specific and different reason.

concept

ETL vs ELT

Whether data is transformed before loading into the target or after it, which decides where the compute happens and how much raw history you keep.

pattern

Event Sourcing

Storing the full sequence of state-changing events as the system of record, and deriving current state by replaying them.

case-study

Figma's Postgres Sharding

Figma delayed sharding for years using replicas and vertical partitioning, then sharded Postgres horizontally without downtime using logical shards a…

practice

Indexing Strategy

Choosing the set of indexes a table carries by working backwards from its actual queries, and accepting the write cost that each one adds.

pattern

Materialized View

A precomputed, stored result of a query, refreshed on a schedule or from a change stream, read instead of recomputing.

case-study

Netflix's Recommendation Architecture

Netflix splits personalisation into offline, nearline and online layers so that expensive computation happens ahead of time and the request path stay…

case-study

Pinterest's MySQL Sharding

Pinterest sharded MySQL by embedding the shard ID inside every primary key, making any object's location computable from its ID alone with no lookup …

concept

Query Plan

The database's chosen strategy for executing a query, and the first thing to look at when one is slow.

pattern

Read Replica

A copy of a database that receives changes from the primary and serves read-only queries, spreading read load.

case-study

Salesforce's Metadata-Driven Multi-Tenancy

Salesforce serves every customer from shared infrastructure with a single physical schema, storing customer-specific data structures as metadata rath…

pattern

Sharding

Splitting one dataset across multiple independent databases by a partition key, so that each holds a disjoint subset.

case-study

Uber's H3 Spatial Index

Uber indexes the world with hexagons rather than squares, because uniform neighbour distance makes supply, demand and pricing computations correct as…

pattern

Versioned Dataset Swap

Publishing a regenerated dataset as a complete new version alongside the live one and flipping a serving pointer atomically, so readers never observe…

concept

Write-Ahead Log

Recording every change to a durable sequential log before applying it, so that a crash can be recovered by replaying the log.

Data Architecture

Neighbouring topics

Relational Modelling

Normalisation, keys, constraints and the invariants a schema enforces.

3 quiz 10 cards 4 terms

NoSQL Stores

Key-value, document, wide-column and graph — what each buys and forbids.

5 quiz 13 cards 4 terms

Indexing

Designing indexes per query shape, and paying for them on every write.

5 quiz 12 cards 6 terms

Query Optimisation

Reading a plan, fixing statistics, and finding the real bottleneck.

3 quiz 11 cards 4 terms

Transactions & Isolation

ACID, isolation levels, and the anomalies each level permits.

3 quiz 10 cards 4 terms

Replication

Primaries, replicas, lag, and synchronous versus asynchronous durability.

4 quiz 14 cards 6 terms

Partitioning & Sharding

Splitting data across machines, and the one-way door of a partition key.

6 quiz 12 cards 10 terms

Caching Strategies

Cache-aside, read-through, write-through and where each belongs.

7 quiz 15 cards 6 terms

Cache Invalidation

Stampedes, penetration, staleness windows and versioned keys.

3 quiz 7 cards 2 terms

CQRS

Separating the write model from the read models that serve queries.

4 quiz 10 cards 5 terms

Event Sourcing

Storing the change log as the system of record, and what that costs forever.

5 quiz 13 cards 4 terms

Change Data Capture

Turning a database's replication log into a stream, and its coupling risk.

5 quiz 14 cards 5 terms

Data Warehousing

Dimensional modelling, star schemas and analytical workloads.

4 quiz 13 cards 3 terms

Data Lakes & Lakehouses

Open formats on object storage with transactional metadata on top.

4 quiz 11 cards 4 terms

ETL & ELT

Where transformation happens, and how much raw history you keep.

3 quiz 9 cards 3 terms

Streaming Data

Windowing, watermarks, late arrivals and exactly-once semantics.

3 quiz 10 cards 2 terms

Data Governance

Ownership, lineage, quality, catalogues and who may see what.

3 quiz 9 cards 4 terms

Data Lifecycle & Retention

How long data is kept, where it ages to, and how it is actually deleted.

4 quiz 11 cards 5 terms

Polyglot Persistence

Choosing a store per workload, and the operational cost of variety.

6 quiz 12 cards 4 terms