UNIT 1
Lecture 9
EER Model
Extended E R Model
1. Specialization
2. Generalization
3. Attribute Inheritance
4. Aggregation
Dinesh Kumar Bhawnani, BIT DURG
Specialization
•The process of designating sub-groupings or
dividing a higher level entity set into a number of
lower level entity set on the basis of specific
features is known as specialization.
•It is an Top – Down approach.
Dinesh Kumar Bhawnani, BIT DURG
Generalization
• The process of grouping or joining two or more lower
level entity sets to make a higher level entity set on
the basis of their common features is known as
generalization.
• It is an Bottom – Up approach.
Dinesh Kumar Bhawnani, BIT DURG
Specialization/ Generalization
• In terms of an E-R diagram, specialization is depicted by a
triangle component labeled ISA.
• The ISA relationship may also be referred to as a superclass-
subclass relationship.
• Higher and lower-level entity sets are depicted as regular
entity sets i.e., as rectangles containing the name of the
entity set.
Dinesh Kumar Bhawnani, BIT DURG
Generalization/ Specialization
Dinesh Kumar Bhawnani, BIT DURG
PERSON
ISA
CUSTOMER EMPLOYEE
Name
Street
City
Cust_id Emp_id Salary
Generalization/ Specialization
Dinesh Kumar Bhawnani, BIT DURG
ACCOUNT
ISA
CHECKING-ACCOUNT SAVINGS-ACCOUNT
Acc_No
Balance
Overdraft_Amount Interest_Rate
Generalization/ Specialization
Dinesh Kumar Bhawnani, BIT DURG
STUDENT
ISA
UNDER-GRADUATE POST-GRADUATE
Stud_Id
Stud_Name
Discipline Specialization
Difference
No. Specialization Generalization
1 It is a Top Down approach. It is a Bottom Up approach.
2 Specialization stems from a single entity set;
it emphasizes differences among entities
within the set by creating distinct lower-
level entity sets.
Generalization proceeds from the recognition
that a number of entity sets share some
common features (namely, they are described
by the same attributes and participate in the
same relationship sets).
3 The process of designating sub-groupings
within an entity set is called specialization.
The process of designating groupings from
various entity sets is called generalization.
4 Specialization is a result of taking a subset
of higher level entity set to form a lower-
level entity set.
Generalization is a result of taking the union of
two or more disjoint (lower-level) entity sets to
produce a higher-level entity set.
Dinesh Kumar Bhawnani, BIT DURG
Attribute Inheritance
• A crucial property of the higher and lower-level
entities created by specialization and generalization is
attribute inheritance.
• The attributes of the higher-level entity sets are said
to be inherited by the lower-level entity sets.
Dinesh Kumar Bhawnani, BIT DURG
Constraints on Specialization/ Generalization
•Condition-defined. In condition-defined lower-
level entity sets, membership is evaluated on the
basis of whether or not an entity satisfies an
explicit condition or predicate.
•User-defined. User-defined lower-level entity
sets are not constrained by a membership
condition; rather, the database user assigns
entities to a given entity set.
Dinesh Kumar Bhawnani, BIT DURG
Condition - Defined
Dinesh Kumar Bhawnani, BIT DURG
ACCOUNT
ISA
CHECKING-ACCOUNT SAVINGS-ACCOUNT
Acc_No
Balance
Overdraft_Amount Interest_Rate
Account_Type
Dinesh Kumar Bhawnani, BIT DURG
PERSON
ISA
EMPLOYEE
Name
Street
City
CUSTOMER
Salary Credit_Rating
ISA
OFFICER SECRETARYTELLER
Officer_No
Station_No
Hours_Worked
Hours_Worked
User - Defined
Constraints on Specialization/ Generalization
• A second type of constraint relates to whether or not entities may
belong to more than one lower-level entity set within a single
generalization. The lower-level entity sets may be one of the
following:
• Disjoint. A disjoint-ness constraint requires that an entity belong to
no more than one lower-level entity set.
• Overlapping. In overlapping generalizations, the same entity may
belong to more than one lower-level entity set within a single
generalization.
• Lower-level entity overlap is the default case; a disjoint-ness
constraint must be placed explicitly on a generalization (or
specialization). We can note a disjointedness constraint in an E-R
diagram by adding the word disjoint next to the triangle symbol.
Dinesh Kumar Bhawnani, BIT DURG
Disjoint Constraint
Dinesh Kumar Bhawnani, BIT DURG
ACCOUNT
ISA
CHECKING-ACCOUNT SAVINGS-ACCOUNT
Acc_No
Balance
Overdraft_Amount Interest_Rate
Account_Type
disjoint
Dinesh Kumar Bhawnani, BIT DURG
PERSON
ISA
EMPLOYEE
Name
Street
City
CUSTOMER
Salary Credit_Rating
ISA
OFFICER SECRETARYTELLER
Officer_No
Station_No
Hours_Worked
Hours_Worked
Overlapping
Constraints on Specialization/ Generalization
• A final constraint, the completeness constraint on a generalization or
specialization, specifies whether or not an entity in the higher-level entity
set must belong to at least one of the lower-level entity sets within the
generalization/specialization. This constraint may be one of the following:
• Total generalization or specialization. Each higher-level entity must belong
to a lower-level entity set.
• Partial generalization or specialization. Some higher-level entities may not
belong to any lower-level entity set.
• Partial generalization is the default.
• We can specify total generalization in an E-R diagram by using a double
line to connect the box representing the higher-level entity set to the
triangle symbol.
Dinesh Kumar Bhawnani, BIT DURG
Total Specialization/ Generaliztion
Dinesh Kumar Bhawnani, BIT DURG
ACCOUNT
ISA
CHECKING-ACCOUNT SAVINGS-ACCOUNT
Acc_No
Balance
Overdraft_Amount Interest_Rate
Account_Type
Dinesh Kumar Bhawnani, BIT DURG
PERSON
ISA
EMPLOYEE
Name
Street
City
CUSTOMER
Salary Credit_Rating
ISA
OFFICER SECRETARYTELLER
Officer_No
Station_No
Hours_Worked
Hours_Worked
Partial
Aggregation
• One limitation of the E-R model is that it cannot
express relationships among relationships.
• Aggregation is an abstraction through which
relationships are treated as higher level entities.
Dinesh Kumar Bhawnani, BIT DURG
ER Diagram with redundant relationships
Dinesh Kumar Bhawnani, BIT DURG
JOB
EMPLOYEE BRANCH
MANAGER
works-on
manages
ER diagram with Aggregation
Dinesh Kumar Bhawnani, BIT DURG
MANAGER
manages
JOB
EMPLOYEE BRANCHworks-on
Draw the ER diagram for a banking enterprise
Dinesh Kumar Bhawnani, BIT DURG
Dinesh Kumar Bhawnani, BIT DURG
E R Diagram Notations
University Questions
1. Write short notes on
1. Generalization
2. Specialization
3. Disjoint and overlapping constraints
4. Condition defined and user defined constraints
5. Total and partial generalization
2. Explain the constraints based on generalization and specialization.
3. Differentiate between specialization and generalization.
4. Explain aggregation with example.
5. Explain enhanced entity set model with examples.
Dinesh Kumar Bhawnani, BIT DURG
For Video lecture on this topic please subscribe to my youtube channel.
The link for my youtube channel is
https://www.youtube.com/channel/UCRWGtE76JlTp1iim6aOTRuw?sub
_confirmation=1
Dinesh Kumar Bhawnani, BIT DURG

Dbms Notes Lecture 9 : Specialization, Generalization and Aggregation

  • 1.
  • 2.
    Extended E RModel 1. Specialization 2. Generalization 3. Attribute Inheritance 4. Aggregation Dinesh Kumar Bhawnani, BIT DURG
  • 3.
    Specialization •The process ofdesignating sub-groupings or dividing a higher level entity set into a number of lower level entity set on the basis of specific features is known as specialization. •It is an Top – Down approach. Dinesh Kumar Bhawnani, BIT DURG
  • 4.
    Generalization • The processof grouping or joining two or more lower level entity sets to make a higher level entity set on the basis of their common features is known as generalization. • It is an Bottom – Up approach. Dinesh Kumar Bhawnani, BIT DURG
  • 5.
    Specialization/ Generalization • Interms of an E-R diagram, specialization is depicted by a triangle component labeled ISA. • The ISA relationship may also be referred to as a superclass- subclass relationship. • Higher and lower-level entity sets are depicted as regular entity sets i.e., as rectangles containing the name of the entity set. Dinesh Kumar Bhawnani, BIT DURG
  • 6.
    Generalization/ Specialization Dinesh KumarBhawnani, BIT DURG PERSON ISA CUSTOMER EMPLOYEE Name Street City Cust_id Emp_id Salary
  • 7.
    Generalization/ Specialization Dinesh KumarBhawnani, BIT DURG ACCOUNT ISA CHECKING-ACCOUNT SAVINGS-ACCOUNT Acc_No Balance Overdraft_Amount Interest_Rate
  • 8.
    Generalization/ Specialization Dinesh KumarBhawnani, BIT DURG STUDENT ISA UNDER-GRADUATE POST-GRADUATE Stud_Id Stud_Name Discipline Specialization
  • 9.
    Difference No. Specialization Generalization 1It is a Top Down approach. It is a Bottom Up approach. 2 Specialization stems from a single entity set; it emphasizes differences among entities within the set by creating distinct lower- level entity sets. Generalization proceeds from the recognition that a number of entity sets share some common features (namely, they are described by the same attributes and participate in the same relationship sets). 3 The process of designating sub-groupings within an entity set is called specialization. The process of designating groupings from various entity sets is called generalization. 4 Specialization is a result of taking a subset of higher level entity set to form a lower- level entity set. Generalization is a result of taking the union of two or more disjoint (lower-level) entity sets to produce a higher-level entity set. Dinesh Kumar Bhawnani, BIT DURG
  • 10.
    Attribute Inheritance • Acrucial property of the higher and lower-level entities created by specialization and generalization is attribute inheritance. • The attributes of the higher-level entity sets are said to be inherited by the lower-level entity sets. Dinesh Kumar Bhawnani, BIT DURG
  • 11.
    Constraints on Specialization/Generalization •Condition-defined. In condition-defined lower- level entity sets, membership is evaluated on the basis of whether or not an entity satisfies an explicit condition or predicate. •User-defined. User-defined lower-level entity sets are not constrained by a membership condition; rather, the database user assigns entities to a given entity set. Dinesh Kumar Bhawnani, BIT DURG
  • 12.
    Condition - Defined DineshKumar Bhawnani, BIT DURG ACCOUNT ISA CHECKING-ACCOUNT SAVINGS-ACCOUNT Acc_No Balance Overdraft_Amount Interest_Rate Account_Type
  • 13.
    Dinesh Kumar Bhawnani,BIT DURG PERSON ISA EMPLOYEE Name Street City CUSTOMER Salary Credit_Rating ISA OFFICER SECRETARYTELLER Officer_No Station_No Hours_Worked Hours_Worked User - Defined
  • 14.
    Constraints on Specialization/Generalization • A second type of constraint relates to whether or not entities may belong to more than one lower-level entity set within a single generalization. The lower-level entity sets may be one of the following: • Disjoint. A disjoint-ness constraint requires that an entity belong to no more than one lower-level entity set. • Overlapping. In overlapping generalizations, the same entity may belong to more than one lower-level entity set within a single generalization. • Lower-level entity overlap is the default case; a disjoint-ness constraint must be placed explicitly on a generalization (or specialization). We can note a disjointedness constraint in an E-R diagram by adding the word disjoint next to the triangle symbol. Dinesh Kumar Bhawnani, BIT DURG
  • 15.
    Disjoint Constraint Dinesh KumarBhawnani, BIT DURG ACCOUNT ISA CHECKING-ACCOUNT SAVINGS-ACCOUNT Acc_No Balance Overdraft_Amount Interest_Rate Account_Type disjoint
  • 16.
    Dinesh Kumar Bhawnani,BIT DURG PERSON ISA EMPLOYEE Name Street City CUSTOMER Salary Credit_Rating ISA OFFICER SECRETARYTELLER Officer_No Station_No Hours_Worked Hours_Worked Overlapping
  • 17.
    Constraints on Specialization/Generalization • A final constraint, the completeness constraint on a generalization or specialization, specifies whether or not an entity in the higher-level entity set must belong to at least one of the lower-level entity sets within the generalization/specialization. This constraint may be one of the following: • Total generalization or specialization. Each higher-level entity must belong to a lower-level entity set. • Partial generalization or specialization. Some higher-level entities may not belong to any lower-level entity set. • Partial generalization is the default. • We can specify total generalization in an E-R diagram by using a double line to connect the box representing the higher-level entity set to the triangle symbol. Dinesh Kumar Bhawnani, BIT DURG
  • 18.
    Total Specialization/ Generaliztion DineshKumar Bhawnani, BIT DURG ACCOUNT ISA CHECKING-ACCOUNT SAVINGS-ACCOUNT Acc_No Balance Overdraft_Amount Interest_Rate Account_Type
  • 19.
    Dinesh Kumar Bhawnani,BIT DURG PERSON ISA EMPLOYEE Name Street City CUSTOMER Salary Credit_Rating ISA OFFICER SECRETARYTELLER Officer_No Station_No Hours_Worked Hours_Worked Partial
  • 20.
    Aggregation • One limitationof the E-R model is that it cannot express relationships among relationships. • Aggregation is an abstraction through which relationships are treated as higher level entities. Dinesh Kumar Bhawnani, BIT DURG
  • 21.
    ER Diagram withredundant relationships Dinesh Kumar Bhawnani, BIT DURG JOB EMPLOYEE BRANCH MANAGER works-on manages
  • 22.
    ER diagram withAggregation Dinesh Kumar Bhawnani, BIT DURG MANAGER manages JOB EMPLOYEE BRANCHworks-on
  • 23.
    Draw the ERdiagram for a banking enterprise Dinesh Kumar Bhawnani, BIT DURG
  • 24.
    Dinesh Kumar Bhawnani,BIT DURG E R Diagram Notations
  • 25.
    University Questions 1. Writeshort notes on 1. Generalization 2. Specialization 3. Disjoint and overlapping constraints 4. Condition defined and user defined constraints 5. Total and partial generalization 2. Explain the constraints based on generalization and specialization. 3. Differentiate between specialization and generalization. 4. Explain aggregation with example. 5. Explain enhanced entity set model with examples. Dinesh Kumar Bhawnani, BIT DURG
  • 26.
    For Video lectureon this topic please subscribe to my youtube channel. The link for my youtube channel is https://www.youtube.com/channel/UCRWGtE76JlTp1iim6aOTRuw?sub _confirmation=1 Dinesh Kumar Bhawnani, BIT DURG