Beginner

Database Schema Design

Design a normalized relational schema for a small application, model one-to-many and many-to-many relationships correctly, and manage schema changes with a real migration tool instead of hand-editing tables.

~3.5h
0 / 7 steps
🚀
Intro

What you're building

Prerequisites: REST API Fundamentals with Node.js; PostgreSQL running locally (natively or via Docker); basic SQL.

Targeted versions: PostgreSQL 18 (current stable release line; PostgreSQL 19 was in beta as of mid-2026); node-pg-migrate as the migration tool.

You'll take the in-memory "tasks" resource from the previous project and give it a real, normalized schema in PostgreSQL — including a related resource with a proper foreign key — and you'll manage every schema change through versioned migration files instead of running ad hoc ALTER TABLE statements by hand.

🔨

Model the entities and relationships

🔨

Normalize and add a many-to-many relationship

🔨

Index for the queries you'll actually run

🔨

Manage schema changes with migrations

🎯
Secret Mission

Secret Mission: model a many-to-many with extra data

🧹
Wrap Up

Before You Go

Pro

Test what you just learned

Self-testing is one of the best ways to retain new skills. Unlock project quizzes to check your understanding.

Log in to unlock