Lecture 5 - ER Diagram in DBMS
Lecture 5 - ER Diagram in DBMS
Lecture 5 - ER Diagram in DBMS
DATABASE SYSTEMS
ER Modelling
Outline of Today’s Class
ER Diagram Tutorial in DBMS
•What is the ER Model?
•History of ER models
•What is ER Diagrams?
•Why use ER Diagrams?
•Components of ER Diagram
•Relationship
•Weak Entities
•Attributes
•Cardinality
•ER- Diagram Notations
•Steps to Create an ERD
•Best Practices for Developing Effective ER Diagrams
History of ER models
• Entities
• Attributes
• Relationships
Components of the ER Diagram
WHAT IS ENTITY?
Entities take part in relationships. We can often identify relationships with verbs
or verb phrases.
For example:
One-to-One Relationships
One-to-Many Relationships
May to One Relationships
Many-to-Many Relationships
Cardinality cont’
1.One-to-one:
One entity from entity set X can be associated with at most
one entity of entity set Y and vice versa.
Example: One student can register for numerous courses.
However, all those courses have a single line back to that
one student.
Cardinality cont’
2.One-to-many:
One entity from entity set X can be associated with multiple entities of
entity set Y, but an entity from entity set Y can be associated with at
least one entity.
Student Class
Cardinality cont’
4. Many to Many: