Stanford CS 145 · data systems built for the AI era
Build real modern data systems.
Every modern data project runs from a single query to a data system spread across a thousand machines. You build it, scale it, and keep it correct.
A five-minute tour
Taking CS 145 at Stanford? Start with the modules, in order, with the kickoffs and problem sets.
Not in CS 145? Take a path instead: every case study in order, or a route aimed at an exam, a SQL screen, or a systems interview. Free to read; opening a page asks you to sign in with Google or an email link, so your progress follows you.
Twenty questions modern data systems answer.
One page each, five minutes each. The tech you learn is in grey.
Data stacks for AI agents
1One text prompt, many valid SQL queries. Your LLM picks one. How do you know it’s correct?query ambiguity · unit tests · eval sets
2Anthropic’s text-to-SQL: 21% to 95% correct, no new model. What changed?grounding · knowledge model · governed metrics
3An agent forgets every session. What do you store so it remembers?durable memory · SQLite · BM25 + vector retrieval
4How do you find the nearest of a billion vectors, without a billion comparisons?vector index · HNSW · graph search
5An agent re-reads the same long prompt every turn. How do you stop paying for it?KV cache · prefix reuse · paging
Reads at scale · OLAP & analytics
6How does Spotify search 100 million tracks without a scan?inverted index · term dictionary · B+Tree
7What takes the same query from $550,000 a year to $400?index selection · IO cost model · big-data economics
8How does “scan a petabyte” become “scan three columns”?columnar storage · Dremel · compression
9How does Spotify Wrapped serve 700 million people in one day?precomputation · clustered index
10How does Chrome check every URL you open without shipping the list?Bloom filter · hashing · false positives
Writes at scale · OLTP & transactions
11How does one Stripe charge become four writes, all or none?ACID · atomicity · two-phase locking
12How do you absorb a billion writes a day without random seeks?LSM tree · MemTable · SSTables · compaction
13How does one primary serve 800 million ChatGPT users?read replicas · replication lag · fan-out
14When do you actually need to shard? Later than you think.sharding · one Postgres first · replicas
15A transfer spans two shards. How do both commit, or neither?two-phase commit · coordinator failure
Trust, security & streaming
16Every nightly job ran green and the numbers were wrong. How do you catch it?data quality · assertions · observability
17Netflix released “anonymous” ratings. How were the names put back?linkage attack · re-identification · differential privacy
18One concatenated string lets an attacker run their own DROP. What stops it?SQL injection · parameterised queries · zero trust
19A trillion messages a day, and a consumer can join years later. How?Kafka · append-only log · consumer offsets
20How do you build storage out of drives you expect to fail?replication · commodity hardware · GFS
All of them, plus the rest, on the case-study path.