- Introduction
- Who This Is For
- How to Use This Repository
- Table of Problems
- Contributing
- Attribution & Sources
Welcome! This is a curated and growing collection of high-quality, real-world database design challenges. It's built for anyone who wants to go beyond just writing SQL and focus on the core skill of data modeling.
The problems here are drawn from textbooks, university assignments, industry-inspired scenarios, and original case studies. The goal is to provide a practical, structured way to master relational schema design — moving past simple queries into thoughtful, real-world modeling decisions.
Each problem includes a sample solution, typically in the form of an ER diagram using Crow’s Foot notation. Why Crow’s Foot? Because it’s clear, widely recognized, and supported by most professional database design tools. It provides an intuitive visual language for modeling entities, attributes, and relationships.
If you're interested in understanding the why behind these designs — the tradeoffs, the design principles, and the relational theory — check out this open-access lecture series on YouTube. This video series is based on the book Grokking Relational Database Design, and explores the reasoning behind good schema design, including normalization, cardinality, keys, and common pitfalls.
- 🧑🎓 Computer science and software engineering students
- 👨🏫 Educators looking for teaching materials or assignments
- 💼 Developers preparing for system design or database interviews
- 🧪 Self-learners seeking structured practice with schema design
- Choose a problem: Pick a problem that interests you from [the problem list](# Problems).
- Read the problem statement: Understand the requirements, entities, attributes, relationships, and extra information provided.
- Design the schema: Create an ER diagram or SQL schema based on the problem.
- Review the sample solution: If you get stuck, refer to the provided sample solution (if available).
- Discuss solutions: If available, review the provided solutions or discuss with peers.
| Title | Domain | Difficulty | Source / Credit |
|---|---|---|---|
| Library Lending System | Education | Easy | Fundamentals of Database Systems |
| Bookstore Inventory System | Retail | Medium | Database System Concepts |
| The Sci-Fi Collective | E-commerce | Medium | Grokking Relational Database Design |
| SHIPS R US | Manufacturing | Medium | Grokking Relational Database Design |
| University Course System | Education | Hard | Database System Concepts |
If you have a database design problem you'd like to contribute, please follow these steps:
- Fork the repository: Create your own copy of the repo.
- Add your problem: Create a new markdown file in the root directory with a clear title.
- Follow the format: Use the given template for structure.
- Include references: If your problem is based on a textbook or course, provide proper attribution.
- Submit a pull request: Once your problem is ready, submit a PR for review.
- Engage with feedback: Be open to suggestions and improvements from the community.
Please note that your solution sample should adopt the Crow's Foot notation for ER diagrams.
All problems include attribution when adapted from books, courses, or websites. This repo is educational and open-access; original sources retain their copyright. If you're the original author of a referenced problem and want it removed or reworded, please open an issue.
This project is licensed under the MIT License. See the LICENSE file for details.
This repository is maintained by Dr. Qiang Hao, a Computer Science professor and the lead author of Grokking Relational Database Design. You can find more of his teaching at his YouTube channel @StructuredCS.