Skip to content

SQL for FE devsFor front-end developers

Notes-style walkthrough of SQL - so APIs, ORMs, and "why is this list slow" stop feeling like magic.

Who this is for ​

I've written this as if I'm leaving notes for myself - a front-end person who knows fetch, filter state, pagination, and nested API payloads… but has mostly treated the database as "backend stuff".

If you've shipped React/Vue/Svelte and you want to understand what sits under /api/contacts?page=2&q=ada, you're in the right place.

How to follow along ​

  1. Install SQLite (Setup)
  2. Read chapters in order - later ones assume earlier mental models
  3. Run the CRM bits from examples/crm/ when we get there
  4. Keep the cheatsheet open once you're past the query core
bash
npm install
npm run docs:dev

And for SQL bits:

bash
sqlite3 examples/crm/crm.db < examples/crm/schema.sql

What's intentionally missing ​

  • Deep Postgres tuning / replication / partitioning
  • Full ORM frameworks (Prisma, Eloquent, etc.) - we peek, we don't marry them
  • Fancy window functions as a lifestyle

We're here for reading SQL confidently and designing a schema that matches a UI you might actually build.

Wish you all the best - hope you're gonna enjoy the ride.

Best,

-- ł.

Notes-style SQL tutorial for front-end folks