Example database schemas
Real-world database designs with an ER diagram and the SQL to create them. Use them as a starting point, then open any one in the Crowsfoot editor to change tables, add notes, and export. New to ER diagrams? Read the crow’s foot notation guide.
E-commerce
Customers, products, orders, and the line items inside each order.
Blog
Users, posts, comments, and tags with a many-to-many link.
School
Students, courses, teachers, and the enrollments that connect them.
Library
Books, authors, members, and who has borrowed what.
Project management
A multi-tenant SaaS: organizations, members, projects, and tasks.
Social network
Users, posts, follows, and likes, including a self-referencing relationship.
Hotel booking
Hotels, room types, rooms, guests, and the bookings that tie them together.
Clinic appointments
Patients, doctors, appointments, and prescriptions.
Inventory
Suppliers, products, warehouses, stock levels, and an audit trail of movements.
Event ticketing
Venues, events, ticket types, attendees, and sold tickets.
Food delivery
Customers, restaurants, menus, and orders with line items.
HR and employees
Departments, employees with managers, salaries, and leave requests.