DBMS Chapter 4
DBMS Chapter 4
DBMS Chapter 4
Outline
Subclass, Super-class and Inheritance
3
Relationships and attributes of super class are
inherited to subclass (in particular primary key
attribute(s)); subclass can have additional
attributes and relationships
An entity cannot exist merely by being a
member of only a subclass.
4
SPECIALIZATION AND GENERALIZATION
Specialization is the process of defining a set of
subclasses of an entity type. (top-down)
This entity type is called the super class of the
specialization. The set of subclasses that forms a
specialization is defined on the basis of some
distinguishing characteristic of the entities in the super
class.
Generalization
Reverse process of specialization (bottom-up); identify
6
CONT…
HOURLY EMPS is a subclass of EMPLOYEES
and
thus inherits its attributes and relationships (same
for CONTRACT EMPS).
7
DIAGRAMMATIC NOTATION FOR GENERALIZATION
8
DESIGN CONSTRAINTS ON A
SPECIALIZATION/GENERALIZATION
Constraint on which entities can be members of a given lower-level
entity set.
condition-defined
Example: all customers over 65 years are members of senior-
citizen entity set; senior-citizen ISA person.
user-defined
Constraint on whether or not entities may belong to more than one
lower-level entity set within a single generalization.
Disjoint
an entity can belong to only one lower-level entity set