Entity / Relationship Matrix SAMPLE – Course Enrollment
Major Steps in Data Modeling
- Identify the entities (see the Entity-Attribute Matrix SAMPLE).
- Create the ER Matrix.
- Draft 1st ERD.
- Normalize.
- Create final ERD.
- Update the Entity-Attribute Matrix.
Using the ER Matrix
- List each Entity both across and down.
- Determine whether a relationship exists between entities and define that relationship with a verb phrase. The entity with the greatest number of related entities is usually the center of the diagram
- Identify minimum (optional or mandatory) and maximum (only one or one or more).
Student / Course / Room / Instructor
Student / none / Enrolls in;
Mandatory
One or more / none / none
Course / Is taken by:
Optional
One or more / none / Held in:
Optional
one or more / Assigned to:
Optional
one or more
Room / none / Scheduled for:
Optional
one or more / none / none
Instructor / none / Teaches:
Optional
One or more / none / none
First Draft ERD—Not Normalized
Because Visio does not allow you to draw a single relationship line with M:M, you have to draw two lines showing both sides of the relationship. As you can see from this example, every entity has a M:M relationship with another entity.
Continue to normalize by creating associative entities for the many-to-many relationships. Create new entities necessary to help normalize and group the data.
For this example, the following rules were determined after the first Draft ERD was created.
- A course may exist without being offered. (It exists in the catalog.) Courses are scheduled for a term and given a section. It is the scheduled course that students enroll in, that are scheduled in rooms and assigned instructors.
- A student can exist without being enrolled in a course
- An instructor can exist without being assigned to teach a course
- A room can exist without being scheduled for a course
The Normalized ERD is on the next page
Page 2 of 4