When to use it
Use it for a database course project, a capstone student information system, or data modeling for a registrar's system. Seven entities cover the hierarchy from college down to student and the many-to-many link between students and courses, which the grade table resolves.
Make it yours
- Add or remove entities and fields, such as dormitory or disciplinary record.
||--o{means one to many;||--||is one to one and}o--o{is many to many.- The types before field names are descriptive; write the types your database uses.
Mermaid code
erDiagram
COLLEGE ||--o{ MAJOR : offers
MAJOR ||--o{ CLASS_GROUP : contains
CLASS_GROUP ||--o{ STUDENT : enrolls
COLLEGE ||--o{ INSTRUCTOR : employs
INSTRUCTOR ||--o{ COURSE : teaches
STUDENT ||--o{ GRADE : earns
COURSE ||--o{ GRADE : produces
COLLEGE {
string college_id PK
string name
}
MAJOR {
string major_id PK
string name
string college_id FK
}
CLASS_GROUP {
string class_id PK
int entry_year
string major_id FK
}
STUDENT {
string student_id PK
string name
string email
string class_id FK
}
INSTRUCTOR {
string instructor_id PK
string name
string title
string college_id FK
}
COURSE {
string course_id PK
string name
int credits
string instructor_id FK
}
GRADE {
string student_id FK
string course_id FK
float score
string term
}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 student information system ER diagram with Mermaid erDiagram syntax. Entities are COLLEGE, MAJOR, CLASS_GROUP, STUDENT, INSTRUCTOR, COURSE and GRADE. College to major, major to class group, class group to student, college to instructor and instructor to course are one to many. Students and courses are linked through GRADE, with student to grade and course to grade one to many. List two to four fields per entity and mark PK and FK. Output only the mermaid code block.
FAQ
- Why is grade a separate entity?
Students and courses are many to many, which a database stores in a junction table. That table can also hold the score and term.
- My course requires Chen notation.
This is crow's foot notation. Chen notation uses ovals for attributes and diamonds for relationships, which you can draw by hand with flowchart syntax.
- Can it generate the CREATE TABLE statements?
Not by itself. Give the code to an AI assistant and ask for table definitions, then check the types and constraints yourself.
More in this category
Updated 2026-11-11