Example ERD

Example

The following screenshot shows an ERD for a school. The diagram has 6 tables, which entities in the school. The tables are linked by lines representing relationships between the data.

The tables are:

  • SchoolDept is a simple table that defines the UID and Name for departments in the school. UID is the primary key and Name is the display name.
    This table has relationships to the ClassRoom and Teacher tables. Because of these relationships, the ClassRoom and Teacher tables can both include a department name, without duplication. UID is the primary key and Name is the Display Name.
  • ClassRoom has details of the class room, with the department name provided by SchoolDept.
  • Course has details of the courses. It takes the teachers name from the relationship to Teacher and provides the course name to CourseAttendee
  • Student has information about a student provides the student's name to CourseAttendee.
  • CourseAttendee has details of the attendees of each course. This table takes data from relationships to both Course and Student tables and illustrates a many-to-many relationship between these two tables.