Unit 6 ERD Part-2
Unit 6 ERD Part-2
Asif Sohail
University of the Punjab
Punjab University College of Information Technology (PUCIT)
Different modeling tools may have different notation for the same
modeling constructs
Database Systems Slide 6
Figure 4-2 – Employee supertype with three subtypes
So we put
the shared
attributes in
a supertype
Only applies to
manufactured
parts
Created 2 subtypes
Types of Subtypes
• There are the following types of subtypes:
a) Exhaustive & Non-Exhaustive subtypes (Completeness
Constraint)
b) Exclusive & Non-Exclusive subtypes.
• Exhaustive subtypes mean that all the subtypes have been
defined and there can’t be any further subtypes.
• Exclusive subtypes mean that each instance of a super type is
categorized as exactly one subtype.
Types of Subtypes
a) Exhaustive & Non-Exhaustive subtypes
• Exhaustive subtypes mean that all the subtypes have been
defined and there can’t be any further subtypes.
• It is used for enforcing completeness constraint, which
determines, Whether an instance of a super type must also be
a member of at least one subtype
– Total Specialization Rule: Yes (double line)
– Partial Specialization Rule: No (single line)
Types of Subtypes
b) Exclusive & Non-Exclusive subtypes
• Exclusive subtypes mean that each instance of a super type is
categorized as exactly one subtype.
• It is used for enforcing Disjointness Constraints, which
determines, Whether an instance of a super type may
simultaneously be a member of two (or more) subtypes
– Disjoint Rule: An instance of the super type can be only
ONE of the subtypes
– Overlap Rule: An instance of the super type could be more
than one of the subtypes
A composite attribute
with sub-attributes
indicating “yes” or “no”
to determine whether it
is of each subtype
Asif Sohail
Assistant Professor
University of the Punjab
Punjab University College of Information Technology (PUCIT)
Allama Iqbal (Old) Campus, Anarkali
Lahore, Pakistan
Tel: +92-(0)42-111-923-923 Ext. 154
E-mail: [email protected]