Skip to content

Databases: first steps

Module 4 of the System Design Masterclass. Every lesson here is free to read, with no account.

  • 9 lessons
  • 3 h 22 min of reading
  1. 17SQL or NoSQL, and which kindHow to choose a database from the way your app uses its data: the five kinds of database, what each is good at, and what each costs.24 minCore Fast track
  2. 18Data modelling: tables, relationships, normal formsHow to turn requirements into tables: find the entities, decide how they link, draw them, and keep each fact in one place with the first three normal forms.24 minCore
  3. 19Design tables for your queriesHow to design tables from the questions the app asks: count the rows each query reads, copy a fact on purpose when a query reads too many, and keep each copy right.24 minDepth
  4. 20Indexes and reading a query planWhy an index makes a query fast, how a B-tree and a composite index work, when an index hurts, and how to read EXPLAIN to find out what the database really does.25 minCore Fast track
  5. 21Transactions: ACID and isolation levelsWhat a transaction promises (ACID), how isolation levels decide what two users doing things at the same time can see, and the bugs that appear when you choose the wrong level.22 minCore Fast track
  6. 22Locking: stop double booking and oversellingHow to make sure two buyers cannot get the same seat or the last item: atomic updates, locks, version checks, unique constraints, and seat holds that expire.23 minCore Fast track
  7. 23Unique IDs: UUID, ULID, Snowflake, sequencesHow to give every row a unique ID: database counters, random UUIDs, time-ordered IDs, Snowflake IDs and counter ranges, and which one to use for which job.24 minCore Fast track
  8. 24Object storage and pre-signed uploadsWhy photos and videos do not belong in database rows, how object storage keeps them, and how a phone uploads big files straight to storage with a pre-signed URL, in parts that can resume.24 minCore
  9. 25Changing a table without downtimeHow to change a big table while the app keeps running: add the new column first, move the data in small steps, and remove the old column last.12 minDepth

The AI tutor is the part you sign up for

Reading is free for everyone. A free account adds the tutor, quizzes, notes and your progress.