Entity Relationships Diagrams
 

Think of Your Class as a Database
Students, Techers, Subjects, Desks and Chairs as Entities

Relationships
Each Student has one desk
Each Student has one chair
Each Student study Three Subjects
Each Teacher teach one subject

How do you show this in a diagram ?

One-to-one Relationship
When one instance of an entity is associated with one instance of another entity.
It is a one-to-one (1:1) relationship.


Here each student has one desk. Hence 1:1 Relationship

One-to-many Relationship
When more than one instance of entity is related to an instance of an entity
it is a one-to-many (1:N) relationship.




Here each student Learns multiple subjects and each teacher teaches multiple subjects, therefore has 1:N relationships between Teachers and Students as well as Students and Subjects.

Many-to-many
More than one instance of an entity associated with more than one instance of another entity.



Many students play many sports.
Many teachers teach many classes.

Consider Your School Sports System.

ABC collage has Athletics, Rugger, Football, Hokey, Badminton and Cricket as sports, 
Each student take part in one more sports.
Each sport has one Master-In-Charge
Each sport has many coaches.


1. List down entities of the system
2. Identify All Entity Relationships
3. What is the relationships between Students and Sports ?
4. What is the relationships between Master In Charge  and Sports ?
5. What is the relationship between Sports and Coaches?

sports relationships


Go Deep ...

6. What is the relationships between Students and Master In Charge ?
7. What is the relationship between Students and Coaches?
8. What is the relationships between the Master In Charge and Coaches?

(c) Shilpa Sayura Foundation 2006-2017