ER diagram examples: 12 database templates with SQL
Sample ER diagrams of whole databases, from a library to an airline. Each comes with its solution: what every table holds, why the keys sit where they do, and the SQL Server script to open and change in ERDsmith, free.
- The ER diagram, drawn by ERDsmith
- What each table holds and why
- The SQL Server script, to copy or download
- Open it in the editor and change it
EducationSQL Server · 10 tablesLibrary management systemBooks and their copies, authors, members, loans, reservations and fines.
HealthcareSQL Server · 10 tablesHospital management systemDepartments, doctors, patients, beds, admissions, appointments and prescriptions.
FinanceSQL Server · 8 tablesBank management systemCustomers, branches, accounts, transactions, cards and loans.
Hospitality and foodSQL Server · 9 tablesHotel management systemRooms and room types, guests, bookings, payments and services.
EducationSQL Server · 7 tablesStudent management systemStudents, courses, enrollments, grades and attendance.
Travel and transportSQL Server · 9 tablesRailway reservation systemTrains, stations, routes, schedules, passengers and tickets.
EducationSQL Server · 9 tablesUniversity databaseDepartments, programs, courses, instructors, class sections and enrollments.
Travel and transportSQL Server · 8 tablesAirline reservation systemAirports, aircraft, flights, passengers, bookings and seats.
RetailSQL Server · 10 tablesOnline shopping systemCustomers, products, categories, carts, orders, payments and reviews.
HRSQL Server · 7 tablesEmployee management systemEmployees, departments, positions, salaries, leave and attendance.
LogisticsSQL Server · 8 tablesInventory management systemProducts, suppliers, warehouses, stock levels and purchase orders.
Hospitality and foodSQL Server · 9 tablesRestaurant management systemDining tables, menu items, orders, reservations, staff and bills.
Make your own ER diagram
Start from any example above and change it, or start from an empty diagram. ERDsmith runs in your browser, has no table limit and needs no account. To read the line ends, see crow's foot notation and ER diagram symbols.