Learn to think in data models. Build schemas, fix broken designs, and get instant feedback. Progress from single tables to complex real-world systems.
Understand tables, columns, and primary keys
One-to-many relationships and foreign keys
Many-to-many, junction tables, real systems
Real-world systems and design tradeoffs
A startup needs to store user accounts. Each user has a name, email, and sign-up date.
An online store needs a simple product list with name, price, and stock quantity.
A junior developer created this table but reports keep showing duplicate entries.
A personal blog needs to store articles with title, body, and publish status.
The finance team reports that transaction amounts show values like $99.99999999 instead of $100.00.
A team needs a simple task management board to track to-do items.
Build a simple contacts table for a phone app.
Users can register with the same email multiple times, causing login failures.
An e-commerce site needs to track which customers placed which orders.
A bookstore needs to track books and their authors. Each book has exactly one author.
The orders table has a customer_id column but it's just a plain INT — there's no FK constraint. Orders reference deleted customers, causing report crashes.
An HR system tracks which department each employee belongs to.
A blog platform needs users who write posts, and readers who comment on them.
A developer put the foreign key on the wrong table. The schema says each department can only have ONE employee.
A school needs to track teachers, subjects, and which teacher teaches which subject in which classroom.
A university tracks which students enroll in which courses. One student takes many courses, one course has many students.
Build a Twitter-like follow system where users can follow other users. Following is asymmetric (A follows B doesn't mean B follows A).
Design a complete order system where customers place orders containing multiple products with quantities.
A developer tried to model students-courses with a comma-separated list of course IDs in the students table. Queries are impossible.
A library tracks books, physical copies, members, and borrowing history. One book title can have multiple copies.
A hotel chain manages multiple properties, room types with pricing, and guest reservations.
Design a food delivery system like Uber Eats. Restaurants list menu items, customers order, and drivers deliver.
Design a Twitter-like platform with posts, comments, likes, and follows.
A developer put EVERYTHING in one giant table. It has 5000 rows with massive redundancy. Updating a restaurant's address requires changing hundreds of rows.
Design a Jira-like project management system with teams, projects, sprints, and tasks.