Why Memory Matters

Concept. CS145 is about how data persists over time.

Intuition. Your other classes teach the actions: algorithms, model inference, systems. Actions are short-term. The data those actions read and write lives in a database, on disk, long-term. ("Memory" here means that durable database, not the volatile RAM chip in your laptop.)

What this course teaches

Five module panels, M1 SQL through M5 Distributed, one machine to many machines, each tagged with the products it powers. They lead into M6 Modern systems, the systems running now: a phone, an AI agent, a data center, and your next app, agent, or system.

Figure 1. Each module adds one capability, and each one supports the next scale.

  • M1 gives you a complete declarative, parallel database

  • M2 stores the rows on disk

  • M3 locates a row in milliseconds

  • M4 keeps it correct while thousands of users write at once

  • M5 runs one logical database across many machines

  • M6 deploys it in a phone, inside an LLM, and at the edge

The career map connects these modules to the projects and the paths they lead to. For what the course actually answers, the twenty questions and the level of the stack each is answered at are on the Modules page.

Where we start: three teardowns

We learn how the database is built by taking three real systems apart and finding the same primitive inside each one. In teaching order, from a laptop to the planet:

Three blue cards left to right: 0.1 small analytics, Pandas on a laptop, fast until it runs out of about 16 GB of RAM; 0.2 agent memory, no memory then local then global, from one user to 800 million; 0.3 a big service, UberEats with one database, three sides and the offline edge. A scale axis underneath runs from one machine to many machines.

Figure 2. Three environments run the same database, from one machine to many. Modules 1 through 6 build it.

0.1 Pandas: Deconstructing Small Analytics. Pandas and Polars on a laptop, the world you already know. What happens when the data no longer fits in RAM?

0.2 Claude & OpenAI: Deconstructing Agent Memory. One AI coding agent, the whole course in one example. Why does it hallucinate with no memory? Why is the context window the same memory limit? How does a local database fix it on one machine? How do you scale it to millions of users, each with their own memory?

0.3 UberEats: Deconstructing a Big Service. UberEats at planet scale, plus the offline edge. How does one database serve billions? How do the driver apps work on a phone?

The short version of all three: the context window, the DataFrame, the phone in a tunnel are short-term memory. Anything that has to outlast them lives in a database. Every serious product (ChatGPT, Stripe, Epic, Spotify) is built that way.

By the end of this course, you can design one. Start with 0.1 Pandas: Deconstructing Small Analytics.