Web-DSS-Chapter-03
Web-DSS-Chapter-03
Web-DSS-Chapter-03
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
64 CHAPTER 3 ■ Entity-Relationship Modeling<br />
Every instance of the superclass STUDENT must be an instance of either the GRADUATE student<br />
or UNDERGRAD student subclass. That is, if John Doe is an instance of a STUDENT, then<br />
John must be a graduate or undergraduate student. However, whether John Doe belongs to the<br />
graduate, undergraduate, or both entity types is answered by the disjoint rule, which we will define<br />
in a moment. We use a double line between the superclass entity type and the circle to represent<br />
the total participation.<br />
Partial Participation Rule Membership is optional in a partial participation. An instance of<br />
a superclass does not have to be an instance of any of the subclasses. For example, consider Figure<br />
3.26. An instance of the LIBRARY ITEM superclass can be a member of BOOK, VIDEO CD,<br />
or JOURNALS; however it is not mandatory for an instance to belong to any of these subclasses.<br />
If the library item Newspaper is an instance of a superclass, it does not have to be included in one<br />
of the subclasses; it can stay at the superclass level without having values for any subclass attributes.<br />
We use a single line between the superclass entity type and the circle (the default notation)<br />
to represent partial participation.<br />
3.17.2 Disjoint Constraints<br />
Disjoint constraints define whether it is possible for an instance of a superclass to simultaneously<br />
be a member of one or more subclasses. Disjoint constraints indicate whether a superclass<br />
instance can be disjointed or overlap more than one subclass.<br />
Disjoint Rule The disjoint rule states that if an instance of a superclass is a member of any<br />
subclass, then it cannot be a member of more than one subtype (note that the participation rule<br />
will dictate whether the instance is a member of a subclass or not). For example, consider Figure<br />
3.28. We put a constraint of disjoint rule to indicate that a student must be either a graduate<br />
or an undergraduate student but cannot belong to both subclasses simultaneously. We<br />
indicate the disjoint rule by putting a letter “D” in the joining circle of the superclass/subclass relationship<br />
(see Figure 3.28).<br />
Name<br />
SSN<br />
GPA<br />
STUDENT<br />
D<br />
GRADUATE<br />
UNDERGRAD<br />
Degree<br />
Chair<br />
Class<br />
Figure 3.28 An example of the disjoint rule.