Skip to content
WebDev Path
Back

Week 18: Databases with PostgreSQL and an ORM

Next video

Free lesson by Fireship on YouTube

About this lesson

Module:
Backend and databases
Time:
about 12 hours
Video:
3 min

Store data safely and model relations between users, posts and comments.

By the end of this week you can

  • Write basic SQL queries
  • Design tables and relations
  • Use Prisma or Drizzle from TypeScript

Learn

  • Tables, rows, keys and relations
  • SELECT, INSERT, UPDATE, DELETE, JOIN
  • Migrations
  • ORMs: Prisma or Drizzle

Read or watch

Practice

  1. Model users, posts and comments
  2. Write 10 queries by hand

Build

Connect your API to a real database.

Check your understanding

Score 4 out of 5 to complete this week.

  1. 1. What does a primary key guarantee?
  2. 2. What does a foreign key do?
  3. 3. Why use parameterised queries (or an ORM) instead of string concatenation?
  4. 4. What is an index for?
  5. 5. Which SQL clause combines rows from two tables?
0 of 5 answered