Course Enrolment System ER Diagram Template
ER diagram with five entities (student, course, enrolment, instructor, department), primary and foreign keys and one-to-many relationships. For database coursework and capstone projects; change the fields and export PNG, Word or PowerPoint for free.
Edit the text, pick a theme, export Word / PowerPoint / PDF
When to use it
Database course assignments and the database design chapter of a course-registration or academic-management capstone project. Students and courses are many-to-many, resolved through the enrolment entity into two one-to-many relationships, the classic ER exam question.
Making it yours
- Fields live inside the braces as
type name PK/FK; the key markers are optional. - Add an entity with a new
NAME { … }block and connect it with a relationship line. - Cardinality symbols:
||exactly one,o{zero or more,|{one or more,o|zero or one; each end describes its own side. - The word on the relationship line is a verb describing what the left entity does to the right one.
Mermaid code
erDiagram
STUDENT ||--o{ ENROLMENT : enrols
COURSE ||--o{ ENROLMENT : "is taken in"
INSTRUCTOR ||--o{ COURSE : teaches
DEPARTMENT ||--o{ STUDENT : administers
DEPARTMENT ||--o{ INSTRUCTOR : employs
STUDENT {
string student_id PK
string name
string major
int year
}
COURSE {
string course_id PK
string title
int credits
string instructor_id FK
}
ENROLMENT {
string student_id FK
string course_id FK
float grade
string term
}
INSTRUCTOR {
string instructor_id PK
string name
string rank
}
DEPARTMENT {
string department_id PK
string name
}Ask an AI for one with this structure
Send the prompt below to ChatGPT or Claude, then paste the whole reply into the editor; the code inside is detected automatically.
Draw a course enrolment system ER diagram in Mermaid erDiagram syntax with entities STUDENT, COURSE, ENROLMENT, INSTRUCTOR and DEPARTMENT. Students and courses are many-to-many through ENROLMENT (STUDENT ||--o{ ENROLMENT, COURSE ||--o{ ENROLMENT); an instructor teaches many courses; a department administers many students and employs many instructors. List the main fields of each entity with PK and FK markers. Output only the mermaid code block.FAQ
- How do I read the relationship symbols?
||--o{reads "one to zero or more": one on the left, zero to many on the right.}o--||is the reverse. Two solid dashes mean a mandatory relationship;..means optional.- Do I have to use real database types?
You can use concrete types such as
varcharanddatetimeor generic ones such asstringandint; Mermaid does not validate type names.- My course requires Chen notation with diamond relationships
Mermaid ER diagrams use crow's-foot notation: boxes for entities and lines for relationships. If Chen notation is required, draw it with a flowchart: entities
[ ], attributes(( )), relationships{ }.
More in this category
E-commerce Database ER Diagram TemplateER diagram with seven entities (customer, address, order, order item, product, category, payment), one-to-many and one-to-one relationships and the main fields. For online shop projects and capstone database design; free PNG, Word and PowerPoint export.
Library Management System ER Diagram TemplateER diagram with six entities (member, book, loan, category, publisher, librarian), the loan junction entity and primary and foreign keys. A common database coursework and capstone topic, exported as PNG, Word or PowerPoint for free.
Updated 2026-09-05