Data Modeling Part 3eng 65
Data Modeling Part 3eng 65
co
1
www.gradeup.co
Content :-
1. Specialization
2. Generalization
3. Aggregation
Specialization:- An entity set E may include some sub-groups of entity (say E1,E2,E3,…En) such that
each of thesesub-groups may have some distinct attributes different than the other sub-groups.
There will be some attributes that will have common to all the sub-groups. The process of
designating these sub-groups within an entity set is called specialization.
In the given example, an Entity set E has been specialized into sub-groups designated as E1, E2,
E3........En . E is called “Super class” or “Higher Level Entity Set” and the entity sets E1, E2, E3........En are
called “Sub Classes” or “Lower Level Entity Set” of E. The common attributes of all entity sets are
represented with the super entity set.
The relationship of Higher level Entity Set with its Lower Level Entity Sets is called ISA relationship. It
is read as “is a”.
Specialization Constraints:
a. Disjoint : It implies that an entity does not belong to more than one lower level entity set
i.e. an account is either saving-account or current but not both.
2
www.gradeup.co
b. Overlapping : In overlapping , an entity may belong to more than one lower-level entity sets
with a single generalization.
c. Total : Each higher level entity must belong to a lower-level entity set .
d. Partial: Some higher level entities may not belong to any lower-level entity set.
Aggregation: One limitation of E-R Model is that it fails to express relationship sets or relationship
between a relationship set on one side and an entity set on the other side. Aggregation provide the
solution in this case. Aggregation is an abstraction through which relationship are treated as high-
level entities, which can be participate in relationships with other entity sets or with other
relationship sets.
3
www.gradeup.co
Example:- Suppose, we have Entity Sets “EMPLOYEE”, “BRANCH” , and “JOB” which is related
through a Relationship “EBJ” which indicates , “which employee” is performing “what jobs” at
“which branch”. There will be multiple jobs at each branch and assume that each employee may be
performing multiple jobs at one of the branches. Suppose, we want to relate another Entity Set
“MANAGER” to indicate:
The above scenario can be better modelled by aggregating the relationship as follows :-
4
www.gradeup.co
***
5
www.gradeup.co