Most SQL tutorials stop at syntax (JOIN, GROUP BY, window functions) and leave you guessing when a real production query suddenly slows down.

Understanding why a query is slow means understanding how the database engine actually parses, plans, indexes, and executes it. Passive reading about B-Trees, query plans, and transaction isolation only gets you so far—it clicks much faster when you can run queries and watch the internals step by step.

That's why I built SQL in Depth, a free, open-source interactive textbook covering SQL and database internals from first principles. Everything runs right in the browser with no accounts, no paywalls, and no local DB setup.

What's Inside

  • Interactive WASM SQLite 3 Workbench — write and run real SQLite 3 queries directly in the browser alongside each lesson.
  • Table-Level Relational Visualizer — watch how joins, filters, groupings, and transformations operate on actual rows step by step.
  • 180 Structured Units — from relational algebra and core SQL semantics to indexing, query optimization, storage internals, and transactions.
  • 36 Interactive Simulators — experiment hands-on with database internals and see how design trade-offs behave.

Feedback & Contributions

If you're preparing for backend interviews, sharpening your SQL fundamentals, or curious about how relational engines work under the hood, give it a spin!

If you find it useful, a star on GitHub helps others discover it—and issues, PRs, or ideas for new simulators are always welcome in the comments or on GitHub.