ER Diagram Examples – Free Interactive Database Design Examples

Each example is a complete and correct conceptual model. Read the requirements, look at the diagram, then open a copy in the editor and change it.

10 examples

(0,N)(0,N)StudentEnrollsCourseidfirst_namelast_namebirth_dateemailenrollment_datecodetitlecreditssemester
Beginner

Student and Course

The smallest useful E-R diagram: two entities and one many-to-many association carrying its own attribute.

View example

(1,1)(1,N)(0,N)(1,1)(0,N)(1,1)BookCopyMemberLoanHasCopyBorrowsLoansCopyisbntitlepublication_yearcopy_numberstatusmembership_nolast_namefirst_nameemailloan_datedue_datereturn_datesequence_no
Beginner

Library Management System

Titles versus physical copies: why a loan points at a copy and not at a book, and how a copy gets an external identifier built from its title.

View example

(0,N)(1,1)(1,N)(1,1)(0,N)(1,1)CustomerOrderProductOrderItemPlacesContainsRefersTocustomer_noemailfull_nameorder_noorder_datestatusskunameunit_pricequantityunit_price
Intermediate

Online Shopping System

An order line is an entity, not an attribute of a many-to-many: it has its own attributes, its own key and its own price frozen at the moment of the order.

View example

(1,1)(0,N)(0,N)(1,1)(0,N)(1,1)(0,N)(1,1)PatientDoctorDepartmentAppointmentWorksInAttendsWithDoctorInDepartmentpatient_nofull_namebirth_datedoctor_nofull_namespecialisationcodenamefloorscheduled_atroom
Intermediate

Hospital Management

An appointment is an entity where four facts meet — patient, doctor, department and time — and not a ternary association between the first three.

View example

(0,N)(1,1)(0,N)(1,1)(1,N)(1,1)GuestReservationRoomPaymentBooksReservesSettledByguest_nofull_nameemailreservation_codecheck_incheck_outroom_noroom_typenightly_ratepayment_noamountpaid_at
Intermediate

Hotel Reservation System

A reservation is an entity, not a many-to-many between guest and room: it has a code of its own, its own dates, and payments that refer to it.

View example

(0,N)(1,1)(0,N)(1,1)(0,N)(1,1)(0,N)(1,1)StudentEnrollmentCourseProfessorDepartmentEnrolsOfCourseTeachesBelongsTostudent_nofull_nameenrolled_ongradecourse_codetitlecreditsprofessor_nofull_nameacademic_rankcodename
Intermediate

University Database

An enrolment is the pair (student, course) - an external identifier - and yet it deserves its own node with its own date and grade.

View example

(0,N)(1,1)(0,N)(1,1)(0,N)(1,1)(0,N)(1,1)UserPostCommentReactionWritesCommentsOnReactsOnPostusernamedisplay_nameemailpost_nobodypublished_atcomment_nobodywritten_atreaction_typecreated_at
Intermediate

Social Network

A reaction is an entity, not a many-to-many between user and post: it has a type and a timestamp, and "one reaction per post per user" is a rule the diagram can only document.

View example

(0,N)(1,1)(0,N)(1,1)(0,N)(1,1)(0,N)(1,1)(0,N)(1,1)CustomerRentalVehiclePaymentBranchMakesUsesPaysOwnedByPickedUpAtcustomer_nofull_namedriving_licencerental_nopicked_up_atreturned_atplatemodelodometerpayment_noamountbranch_codecity
Advanced

Car Rental System

An agency that rents the same car many times: the example that shows what an E-R schema records about time, and what it silently cannot forbid.

View example

(0,N)(1,1)(0,N)(0,N)(0,N)(1,1)(0,N)(1,1)StudentClassTeacherSubjectEnrollmentAttendsTeachesHasEnrollmentOfSubjectstudent_nofull_namebirth_dateclass_codeschool_yearroomteacher_nofull_namesubject_codenameweekly_hoursenrolled_on
Advanced

School Management System

A school where a class, a subject and a teacher meet: the example that shows when a many-to-many pair has to be promoted to an entity.

View example

(0,N)(1,1)(0,1)(0,N)(0,N)(1,1)(0,N)(1,1)EmployeeDepartmentProjectAssignmentWorksInSupervisesStaffedOnOnProjectemployee_nofull_namehired_ondepartment_codenamebudgetproject_codenamestarted_onroleweekly_hours
Advanced

Company Employee Management

A hierarchy and a staffing table in one schema: the example built on a recursive association and on an entity that exists only to resolve a many-to-many.

View example

Learn the theory behind these diagrams

ERMap Academy explains every construct you see here, from requirements analysis to the SQL implementation, using the same diagrams you can open in the editor.

Start learning