Learn Everything

Module · Backend Engineer

Relational Databases

Schemas that survive contact with reality, and migrations that can be rolled back.

2 topics4 interactive tasks

TOPIC 01

Schemas & Indexes

Put the constraints in the database, and index the queries you actually run.

What you'll practice

  • Design Tables With Constraints — guided · beginner
  • Index the Queries You Run — practice · intermediate

A command you'll meet

cat ~/backend/db/schema.sql

The database is the last line of defence. Open the task below for the full walkthrough.

TOPIC 02

Migrations & Transactions

Ship schema changes without downtime, and keep transactions doing what you think.

What you'll practice

  • Write a Reversible Migration — practice · intermediate
  • Pick the Right Isolation Level — challenge · advanced

A command you'll meet

cat ~/backend/db/migrations/001_create_orders.sql

Every migration needs a way back. Open the task below for the full walkthrough.