You are on page 1of 12

EER Model

Enhance Entity Relationship Model


Specialization/Generalization
Generalization and Specialization both the terms are more common in Object Oriented
Technology, and they are also used in the Database with the same features.
Generalization occurs when we ignore the differences and acknowledge the similarities
between lower entities or child classes or relations to form a higher entity.
However, when we moved on to the specialization, it spilt a higher entity to form lower
entities, then we discover the differences between those lower entities.
Generalization
Generalization is the process of generalizing the entities which contain the properties of
all the generalized entities.
It is a bottom approach, in which two lower level entities combine to form a higher level
entity.
Generalization is the reverse process of Specialization.
It defines a general entity type from a set of specialized entity type.
It minimizes the difference between the entities by identifying the common features.
For example:
In the above example, Tiger, Lion, Elephant can all be generalized as Animals.
Specialization
• Specialization is a process that defines a group entities which is divided into sub groups
based on their characteristic.
• It is a top down approach, in which one higher entity can be broken down into two lower
level entity.
• It maximizes the difference between the members of an entity by identifying the unique
characteristic or attributes of each member.
• It defines one or more sub class for the super class and also forms the
superclass/subclass relationship.
Example
In the above example, Employee can be specialized as Developer or Tester, based on what
role they play in an Organization.
Superclass
• Super class is an entity type that has a relationship with one or more
subtypes.
• An entity cannot exist in database merely by being member of any
super class.
For example: Shape super class is having sub groups as Square, Circle,
Triangle.
Subclass
• Sub class is a group of entities with unique attributes.
• Sub class inherits properties and attributes from its super class.
For example: Square, Circle, Triangle are the sub class of Shape super
class.
Superclass and Subclass Relationship
• Member of Subclass also member of superclass.
• The relationship between a superclass and a subclass is one-to-one
(1:1) and is called a superclass/subclass relationship.
Specialization Process and Generalization
Process
Specialization Process
• The process of maximizing the differences between members of an
entity by identifying their distinguishing characteristics.
Generalization Process
• The process of minimizing the differences between entities by
identifying their common characteristics
Constraints of Specialization & Generalization
There are two constraints of Specialization and Generalization
Constraints.
i. Participation Constraints
ii. Disjoint Constraints
Participation Constraints
• Determines whether every member in the superclass must participate
as a member of a subclass.
Disjoint Constraints
Describes the relationship between members of the subclasses and indicates
whether it is possible for a member of a superclass to be a member of one,
or more than one, subclass.
It depends on AND/OR
OR
One Row in a subclass can occur, Nor More then one can occur
AND
More then one row may occur in Subclass.
1. Mandatory, OR
2. Mandatory, AND
3. Optional, AND
4. Optional, OR
Aggregation and Composition
Aggregation
Represents a ‘has-a’ or ‘is-part-of’ relationship between entity
types, where one represents the ‘whole’ and the other the ‘part’.
Composition
A specific form of aggregation that represents an association
between entities, where there is a strong ownership and coincidental
lifetime between the ‘whole’ and the ‘part’.

You might also like