You are on page 1of 8

Database System Concepts

(CS 371)
Lecture – 6
Extended E-R Features

Prepared by –
Dr. Soumen Moulik
Department of Computer Science & Engineering
National Institute of Technology Meghalaya
Specialization
 An entity set may include subgroupings of entities that are
distinct in some way from other entities in the set
 A subset of entities within an entity set may have attributes
that are not shared by all the entities in the entity set
◦ Ex 1– entity set person, with attributes name, street, and city
◦ A person may be classified as – customer and employee
◦ Customer entities – new attribute such as customer-id
◦ Employee entities – new attribute such as employee-id and salary
 In terms of E-R diagram specialization is depicted by a
triangle component labeled ISA, which stands for “is a” and
represents that a customer “is a” person
 The ISA relationship may also be referred to as a superclass-
subclass relationship

Dr. Soumen Moulik, Dept. of CSE, NIT Meghalaya


Generalization
 Multiple entity sets are synthesized into a higher-level entity
set on the basis of common features
 Specialization represents a top-down design process,
whereas, generalization represents a bottom-up manner
◦ The database designer may have first identified a customer entity set
with the attributes name, street, city, and customer-id, and an
employee entity set with the attributes name, street, city, employee-
id, and salary.
◦ Several attributes are in common between the customer entity set and
the employee entity set
◦ This commonality can be expressed by generalization
 For all practical purposes generalization is a simple inversion
of specialization
◦ Specialization emphasizes differences among entities within a set
◦ Generalization emphasizes on the commonalities of entity sets
Dr. Soumen Moulik, Dept. of CSE, NIT Meghalaya
Generalization

Dr. Soumen Moulik, Dept. of CSE, NIT Meghalaya


Aggregation
 One limitation of the E-R model is that it cannot express
relationships among relationships
 Consider a complex quaternary relationship manages
between employee, branch, job, and manager

Redundant
information in the
resultant figure –
every employee,
branch, job
combination in
manages is also
in works-on

Dr. Soumen Moulik, Dept. of CSE, NIT Meghalaya


Aggregation
 Aggregation is the best way to model such situation
 Aggregation is an abstraction through which relationships are
treated as higher level entities
 We regard the
relationship set
works-on (relating
the entity sets
employee, branch,
and job) as a higher-
level entity set called
works-on
 Such an entity set is
treated in the same
manner as is any
other entity set
Dr. Soumen Moulik, Dept. of CSE, NIT Meghalaya
Alternative E-R Notations

Dr. Soumen Moulik, Dept. of CSE, NIT Meghalaya


E-R Diagram – banking system

Dr. Soumen Moulik, Dept. of CSE, NIT Meghalaya

You might also like