Ho Chi Minh University of Technology
Data Engineering - SDH211
ER weakness and EER model
Instructor : Assoc Prof. Dr. Tran Minh Quang
Group 1 : Nguyen Dinh Khuong - 2270174
Nguyễn Trung Hiếu - 2270308
Outline
● ER model
● ER weakness
● EER model
● EER model examples
● Conclusion
ER Model
ER Model stands for Entity-Relationship Model (ERM),
is a high-level data model that shows the relationship among the
entity sets.
ERM (also known as ER Diagram - ERD) used to design or debug
relational databases in the fields of software engineering, business
information systems, education and research.
Components of ER model
ER model has three main components:
● Entity
● Attribute
● Relationship
Components of ER model
Entity is any object, class, person or place that physically exists in the real
world.
Example: In an organization, employees, managers, and projects assigned
can be considered entities.
Typically shown as a rectangle.
Components of ER model
Attribute is a property or characteristic of an entity.
The attributes that can uniquely define an entity are considered as the
key attribute.
An entity may contain any number of attributes
shown as an oval or circle
Entity and Attributes example:
Components of ER model
Relationship the way two or more
entities are linked. There are three
types:
● One to One (1:1)
● One to Many (or Many to One) (1:N,
N:1)
● Many to Many (M:N)
Double lines represent: Participation
contraints
shown as diamonds or labels directly
on the connecting lines.
Weak entity and weak relationship
Weak relationship is the relation between one strong and one weak
entity, and is represented by double diamond.
ER weakness
When data gets more complicated, some problems, called connection
traps, may arise due to a misinterpretation of the meaning of certain
relationships.
There are mainly two types of connection traps
1.Fan traps
2.Chasm traps
ER weakness
Fan traps: occur in a situation when a model represents relationship
between entity types however a path between certain entity
occurrences is ambiguous.
ER weakness
Chasm traps : occur when a model suggests relationship between entity
types however a path between certain occurrences does not exist.
ER weakness
When data gets more complicated, ER model show some disadvantages:
● Limited specification
● Loss of information content
● Limited relationship representation
ER weakness
Attribute inheritance
Source:
EER
EER stands for Enhanced (| Extended) ER model
is a high-level or conceptual data model incorporating extensions to
the original entity–relationship (ER) model, used in the design of
databases
From ER model, EER adds more concepts.
Concepts of EER model
EER model includes all the concept used in ER model:
● Entity types
● Attributes
● Relationship types
From that, we have in EER model :
● Attribute inheritance
● Superclass/subclass relationships
● Specialization
● Generalization
● Categorization
Specialisation
Specialisation:
● Defining set of subclasses of entity type.
● The set of subclasses that form a specialisation is defined on the basis of some distinguishing
characteristic of the entities in the superclass
The specialisation process:
● Defines a subset of subclasses of an entity type representing an "IS A" relationship
● Establishes additional specific attribute types for each subclass
● Establishes additional specific relationship types between each subclass and other entity types
Generalisation and Specialisation
● Generalisation (also called abstraction) is the reverse process of
specialisation.
● Specialisation corresponds to a top-down process of conceptual refinement.
● Generalisation corresponds to a bottom-up process of conceptual synthesis.
Disjointness and Completeness
Disjointness constraint
● Disjoint: an entity can be member of at most one of the subclasses
● Overlap : the same entity may be member of more than one subclass
Completeness constraint
● Total: every entity in the superclass must be a member of some subclass
● Partial: allows an entity not to belong to any of the subclasses
4 possible combination :
● Disjoint and total
● Disjoint and partial
● Overlapping and total
● Overlapping and partial
Specialisation hierarchy: every subclass can only have a single superclass
Specialisation lattice: a subclass can have multiple superclasses
In a specialisation lattice or hierarchy, a subclass inherits the attribute types and
relationship types of all its predecessor superclasses all the way to the root of the
hierarchy or lattice
The concept where a shared subclass (i.e. a subclass with multiple parents) inherits
from all of its parents is called multiple inheritance.
Multi-inheritance
Categorization
- A category is a subclass that has several possible superclasses.
- Each superclass represents a different entity type.
- The category represents a collection of entities that is a subset of the
union of the superclasses.
Additional : Aggregation
● Entity types that are related by a particular relationship type can be
combined into a higher-level aggregate entity type.
● Can be useful when the aggregate entity type has its own attribute
types and/or relationship types
Appendix : Step by step drawing EER Diagram
1. Identify the entity types
2. Identify the relationship types and assert their degree
3. Assert cardinality ratios and participation constraints
4. Identify the attributes and assert whether they are simple/composite; single/multiple
valued
5. Link each attribute type with an entity type or a relationship type
6. Denote the key attribute type(s) of each entity type
7. Identify weak entity types and their partial keys
8. Apply abstractions such as generalisation/specialisation, categorisation and
aggregation
9. Assert the characteristics of each abstraction: disjoint/overlapping, total/partial
Conclusion
ER model : high-level data model that shows the relationship among the
entity
EER model : The extend of ER model
ER has weakness, also EER, but EER add more concepts in order to
overcome those
+ To know more notation : Search up ERD notation
+ A tool to illustrate ER diagram : Lucidchart, Draw.io, …
+ Need a little concept of OOP inheritance in order to deeply
understand
Thank you for your listening !
All questions are welcome !!!
Further questions - email : ndkhuong.sdh221@hcmut.edu.vn
ngtrhieu.sdh221@hcmut.edu.vn