Skip to content

StructuredCS/awesome-database-design-problems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Awesome Database Design Problems

Table of Contents

📘 Introduction

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.

🎯 Who This Is For

  • 🧑‍🎓 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

🛠️ How to Use This Repository

  1. Choose a problem: Pick a problem that interests you from [the problem list](# Problems).
  2. Read the problem statement: Understand the requirements, entities, attributes, relationships, and extra information provided.
  3. Design the schema: Create an ER diagram or SQL schema based on the problem.
  4. Review the sample solution: If you get stuck, refer to the provided sample solution (if available).
  5. Discuss solutions: If available, review the provided solutions or discuss with peers.

📋 Table of Problems

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

🤝 Contributing

If you have a database design problem you'd like to contribute, please follow these steps:

  1. Fork the repository: Create your own copy of the repo.
  2. Add your problem: Create a new markdown file in the root directory with a clear title.
  3. Follow the format: Use the given template for structure.
  4. Include references: If your problem is based on a textbook or course, provide proper attribution.
  5. Submit a pull request: Once your problem is ready, submit a PR for review.
  6. 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.

🏷 Attribution & Sources

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.

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.


👤 About the Maintainer

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors