Course · 6 lessons ~35 hr Intermediate

SQL Foundations & Relational Theory

Build rock-solid SQL fundamentals beyond what ActiveRecord generates. Understand the relational model — sets, relations, normalization — so you can reason about database design from first principles instead of from Rails conventions. ActiveRecord generates SQL. Reading EXPLAIN ANALYZE output is the single most valuable database skill for a Rails engineer. When you write `User.where(active: true).order(:created_at).limit(10)`, ActiveRecord generates `SELECT "users".* FROM "users" WHERE "users"."active" = TRUE ORDER BY "users"."created_at" ASC LIMIT 10`. But what plan does PostgreSQL choose? Index scan or sequential scan? Does the index on `active` help or does the `ORDER BY` force a sort? After Module 0, you can answer these questions by reading the query plan, not by guessing.

reading · we frame, you read MIT or the canonical taught · we author, no canonical fits ↺ spirals back to earlier lessons

6 lessons. Read in order; spiral back when you need to. By the end you'll have used the core ideas twice — once on the abstract, once on something you'll meet at work next week.