ER Diagram for an Online Course Platform (Visio Example, Crow's Foot)
Students, courses, enrolments and lessons. Draw the online course platform ER diagram in Visio with crow's foot notation, fix the many-to-many between student and course with an enrolment entity, and put each foreign key on the right side.
Step by step
- Online course ERD. An online course platform has students, courses and lessons. It looks simple, but it hides a many-to-many relationship. Here it is drawn in Visio with crow's foot notation.
- Crow's Foot stencil. Open the Crow's Foot Database Notation stencil in the Shapes pane. All the entities and relationships below come from it.
- Student. Add a Student entity. StudentID is the primary key, followed by Name and Email.
- Course. Add a Course entity on the far side of the page. CourseID is the primary key, then Title and Price.
- Enrolment. A student takes many courses, and a course has many students, so this is many-to-many. Add an Enrolment entity in the middle with EnrolmentID, StudentID and CourseID. StudentID and CourseID are foreign keys. Connect Student to Enrolment with a Relationship connector. Set the ends so that one student has zero or many enrolments. Connect Course to Enrolment the same way. One course has zero or many enrolments, because a brand new course has none yet.
- Lesson. Add a Lesson entity under Course, with LessonID, the CourseID it belongs to, and Title. Connect Course down to Lesson. This time the Lesson end is one or many, not zero or many, because a course with no lessons can't be published.
- Where data goes. Enrolment is where later data goes: the date joined, the progress and the grade. Each of these is about one student on one course, so it belongs in Enrolment, not in Student or Course.
- Done. Click an empty part of the page to deselect everything and see the finished model.
- The rule. Student and Course are many-to-many, fixed by Enrolment. Course to Lesson is one-to-many, and the foreign key sits in Lesson. That gives 4 entities and 3 relationships.
Common mistakes
- Drawing a line straight from Student to Course. A database table can't store a many-to-many link directly. Add an Enrolment entity between them that holds StudentID and CourseID, with a one-to-many link from each side.
- Putting the foreign key on the wrong side. The foreign key goes on the many side. Lesson holds CourseID. Course does not hold a LessonID, because one course has many lessons.
- Storing the grade or join date in Student or Course. A student has a different grade and progress on every course they take. Put these attributes in Enrolment, where each row is one student on one course.
- Using one or many where zero or many is true. A new course has no enrolments yet, so the Enrolment end should be zero or many. Keep one or many for rules that really hold, like a published course needing at least 1 lesson.
When a business analyst uses this
In a requirements workshop for a company training portal, a business analyst sketches this ER diagram to check with stakeholders that progress and grades are tracked per enrolment, not per student. That gets the data requirements agreed before sign-off and before developers build the tables.
Questions people ask
What is an ER diagram and what are its components?
An ER diagram shows the things a system stores data about (entities), the details kept for each one (attributes, such as StudentID or Title) and how they link (relationships). Crow's foot notation shows on each line how many of one entity can link to the other.
What entities does an ER diagram for an online learning platform need?
A basic model needs Student, Course, Enrolment and Lesson. Enrolment links students to courses and holds per-course data such as progress and grade. A larger platform may add more entities later.
Is an ER diagram the same as a data flow diagram for an e-learning platform?
No. An ER diagram shows what data is stored and how it links, like Student, Course and Enrolment. A data flow diagram shows how data moves between processes, people and data stores, such as a student enrolling in a course.