12.07.2015 Views

Web-DSS-Chapter-03

Web-DSS-Chapter-03

Web-DSS-Chapter-03

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SECTION 3.17 ■ Participation and Disjoint Contraints 65SSNBirthDateSexAddressEmailPERSONOfficePhoneOFACULTY STAFF STUDENTSalaryAddressSalaryDesignationGPAClassFigure 3.29 An example of the overlap rule.Overlap Rule The overlap rule states that if an instance of a superclass is a member of anysubclass, then it can be a member (overlap) of more than one subtype. For example, considerFigure 3.29. It reveals that an instance of a PERSON must be FACULTY, STAFF, a STUDENT,or any combination of these three. A work-study person would overlap, for example, the STAFFand STUDENT entities. We indicate the overlap rule by putting a letter “O” in the joining circleof the superclass/subclass relationship.3.17.3 Subclass DiscriminatorsThe participation and disjoint constraints allow an instance of a superclass to be a member ofone or more subclasses. We keep track of membership using a special attribute of a superclass,a subclass discriminator. In other words, we put a discriminating attribute on a superclass thatcan record membership of superclass instances into one or more subclasses. Figure 3.30 providesan example of total participation with the disjoint rule. An instance of STUDENT item must bea member of exactly one subclass. For every instance of a superclass when it is assigned to eithersubclass, we record the membership in the StudentType attribute. For example, if John Doe is agraduate student, we assign a value, say “G,” to StudentType. If Monica Adams is an undergraduatestudent, we assign StudentType “U,” and so on.There are two special cases with partial participation and overlap rules using a discriminatingattribute. If the participation is partial and an instance of a superclass does not participate inany subclasses, we assign NULL value to the discriminating attribute. If an overlap rule is in effectand if an instance of a superclass participates in more than one subclass, we assign multiplevalues to the discriminating attribute. Thus, the discriminating attribute becomes a multi-valuedattribute under the overlap rule.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!