2. Characteristics of E-R Modeling
– Proposed by Dr. Peter Chen in 1976
– Semantic data model
– Express the logical properties of an enterprise
database
– No physical DBMS
– Unified Modeling Language (UML)
3. Components of E-R Model
– Entity
– Attribute
– Keys
– Relationship
– Constraints
4. Entity
–An entity is an object that exists and which
is distinguishable from other objects. An
entity can be a person, a place, an object,
an event, or a concept about which an
organization wishes to maintain data
5. Entity
– Different Types of Entities
o Strong entity (parent, owner, dominant)
o Weak entity (child, dependent, or subordinate)
o Associative entity
– Diagram Notation
–
6. Entity
– An Associative Entity is an entity type that
connects the instances of one or more entity
types and contains attributes particular to this
association.
– A Strong Entity type exists independent of
other entity types, while a Weak Entity type
depends on another entity type.
7. Attribute
– Domain
– Types of Attribute
o Simple Attribute
o Composite Attribute
o Single-valued Attribute
o Multi-valued Attribute
o Derived Attribute
9. Relationship
– Relationships are Meaningful Associations between
or among entities.
– Weak relationships, or identifying relationships, are
connections that exist between a weak entity type
and its owner.
10. Relationship
– Degree of a relationship
o The number (unary, binary, or ternary) of entity
sets that participate in a relationship is called the
degree of relationship.
– Types of Relationship
o Unary (recursive relationship)
o Binary
o Ternary
o Quaternary
13. Structural Constraints on
Relationship
– The main type of constraint on relationships is called
Multiplicity.
– The number of possible occurrences of an entity
type that may relate to a single occurrence of an
associated entity type through a particular
relationship.
– One-to-one 1..1
– One-to-many 1..*
17. Multiplicity Constraints
– Multiplicity actually consists of two separate
constraints known as cardinality and
participation.
– The Cardinality of relationship represents the
minimum/maximum number of instances of
entity B that must/can be associated with any
instance of entity A.
21. Multiplicity Constraints
– Participation constraints
– Determines whether all or only some entity
occurrences participate in a relationship.
– Total (mandatory, every one involved)
– Partial (optional, only some involved)
–
22.
23. Problems with ER Models
– Improper relationship (Connection Trap)
– Fan trap (ambiguous pathway)
– Chasm trap (missing pathway)
24. Example
A university consists of a number of departments.
Each department offers several courses. A number
of modules make up each course. Students enrol in
a particular course and take modules towards the
completion of that course. Each module is taught by
a lecturer from the appropriate department, and
each lecturer tutors a group of students
25. Example - Entities
A university consists of a number of departments.
Each department offers several courses. A number of
modules make up each course. Students enrol in a
particular course and take modules towards the
completion of that course. Each module is taught by
a lecturer from the appropriate department, and
each lecturer tutors a group of students
26. Example - E/R Diagram
ModuleCourse
Department
Student
Lecturer
Entities: Department, Course, Module, Lecturer, Student
27. Example - E/R Diagram
ModuleCourse
Department
Student
Lecturer
Offers Each department offers
several courses
28. Example - E/R Diagram
ModuleCourse
Department
Student
LecturerIncludes
Offers
A number of modules make up each courses
29. Example - E/R Diagram
ModuleCourse
Department
Student
LecturerIncludes
Offers
Enrols In
Students enrol in a particular course
30. Example - E/R Diagram
ModuleCourse
Department
Student
LecturerIncludes
Offers
Enrols In
Takes
Students … take modules
31. Example - E/R Diagram
ModuleCourse
Department
Student
LecturerIncludes
Offers
Enrols In
Takes
Teaches
Each module is taught by
a lecturer
32. Example - E/R Diagram
ModuleCourse
Department
Student
LecturerIncludes
Offers
Enrols In
Takes
Employs
Teaches
A lecturer from the
appropriate department
33. Example - E/R Diagram
ModuleCourse
Department
Student
LecturerIncludes
Offers
TutorsEnrols In
Takes
Employs
Teaches
each lecturer tutors a group of students
34. Example - E/R Diagram
ModuleCourse
Department
Student
LecturerIncludes
Offers
TutorsEnrols In
Takes
Employs
Teaches