Part 17 of 25
Databases and SQL
Almost every full stack job needs SQL, and many interviews include a live SQL task: joins, grouping, "find the customers who never ordered", "the latest order per customer", or "why is this query slow?". This part starts from "what is a table" and goes all the way to indexes, query plans, transactions, isolation levels, locking, data modelling, migrations, NoSQL with DynamoDB, and Prisma. It uses PostgreSQL, the most popular database among developers. PostgreSQL 19 was released on 19 November 2026; everything here also works on versions 15 to 18. Every query in this part was run on a real PostgreSQL engine against the sample shop database below, and the result tables shown are the real output.
Your progress
0%0 of 19 lessons complete
A lesson is complete when its quiz and all three practice levels are passed.
19 lessons in this part
- Lesson 212What a database is: tables, rows and keysNot started
- Lesson 213SELECT, WHERE, ORDER BY and LIMITNot started
- Lesson 214INSERT, UPDATE, DELETE and upsertNot started
- Lesson 215JOINsNot started
- Lesson 216GROUP BY, HAVING and aggregatesNot started
- Lesson 217Subqueries and CTEsNot started
- Lesson 218Window functionsNot started
- Lesson 219NULL, CASE and datesNot started
- Lesson 220Indexes: B-tree, composite and coveringNot started
- Lesson 221EXPLAIN and the N+1 problemNot started
- Lesson 222Keyset pagination vs OFFSETNot started
- Lesson 223Transactions and ACIDNot started
- Lesson 224Isolation levelsNot started
- Lesson 225Locks, deadlocks, optimistic vs pessimisticNot started
- Lesson 226ConstraintsNot started
- Lesson 227Data modelling: normalisation and relationshipsNot started
- Lesson 228Migrations, soft deletes, audit trails and multi-tenant schemasNot started
- Lesson 229NoSQL and DynamoDBNot started
- Lesson 230PrismaNot started