ERD Examples
University
We have a university where a Student enrolls in courses. A Student must be assigned to at least one or more Courses. Each Course is taught by a single Professor. A Professor can deliver only one course.
Step 1: Entity Identification
Student
Course
Professor
Step 2: Relationship Identification
Student is assigned a course
Professor teaches a course
Step 3: Cardinality Identification
A student can be assigned multiple courses
A course can be enrolled by multiple students
A professor can deliver only one course
Step 4: Identify Attributes
Student: StudentId, StudentName, StudentAge
Course: CourseID, CourseName
Professor: EmployeeId, ProfessorName, EmployeeAge
Note the underlined primary key attribute
Step 5: Create ERD Diagram
MySQL Sample ERD Diagrams
Employee - Department
https://www3.ntu.edu.sg/home/ehchua/programming/sql/SampleDatabases.html
Last updated