Constraints based on user Constraints based on disjointness aspect Constraints based on completeness aspect

c. Constraints based on user

This is the case where there is no condition applied in order to determine membership in a subclass. Subclass membership is based on database users when they apply the operation to add an entity to the subclass. No direct representation of this type of constraint in EERD.

d. Constraints based on disjointness aspect

This type of constraint specifies whether an entity can be a member of more than one subclass of the specialization or not.

e. Constraints based on completeness aspect

This type of constraint determines whether an entity has the option for not to belong to any of the subclasses or not. Since there are various notations to model Disjointness and Completeness constraints, therefore there are many ways can be adopted in order to representdesign generalization and specialization for these types of constraints. In context of Chen notation, there are 2 categories of constraints : 1 Disjointness i. Disjoint : is represented by d symbol Entity can be a member of at most one of the subclasses ii. Joint Overlapped : is represented by o symbol. Entity may be a member of more than one subclass 2 Completeness i. Total: is represented by double line An entity must be a member of subclass ii. Partial: is represented by a single line Allow an entity not to belong to any of the subclass 17 Therefore, there are 4 types of combination between both constraints : i. Disjoint,total ii. Disjoint,partial iii. Overlapped,total iv. Overlapped,partial In context of UML notation there are 3 categories of constraints : 1 Disjointness the meaning is similar with Chen notation i. Disjoint ii. Overlapped 2 Completeness i. Complete: represents the END of hierarchy tree ii. Incomplete: represents inheritance may be extended 3 Participation the meaning is similar with Chen notation : TotalPartial i. Mandatory ii. Optional Constraints in UML are placed inside the curly brackets { }.Combination between 1 and 2 or 3 and 1 can be selected. The results of combinations: If 1 and 2: i. {disjoint, complete} ii. {disjoint} iii. {overlapped, complete} iv. {overlapped} If 1 and 3 : i. {mandatory, disjoint} ii. {mandatory, overlapped} iii. {optional, disjoint} iv. {optional, overlapped} 18 Comparison between Chen and UML notation to represent specializationgeneralization constraints can be summarized in Table 3-1. Table 3-1 : Specializationgeneralization constraints Chen notation UML notation Constraint type Disjointness -Disjoint : d symbol -Overlapped : o symbol Completeness -Total : Double line -Partial : Single line Disjointness -Disjoint -Overlapped Completeness -Complete -Incomplete Participation -Mandatory -Optional Types of specialization generalization 1 Disjoint, total 2 Disjoint, partial 3 Overlapped, total 4 Overlapped , partial If combination is between type 1 and type 2 : 1 {disjoint,complete} 2 {disjoint} 3 {overlapped,complete} 4 {overlapped} If combination is between type 3 and type 1 : 1 {mandatory, disjoint} 2 {mandatory,overlapped} 3 {optional,disjoint} 4 {optional,overlapped} Example Student Graduate Undergraduate d Note : Type of specialization generalization shown in this figure is disjoint, total Student Graduate Undergraduate {mandatory,disjoint} Note : Combination used is between constraint type 3 and 1

3.2 Exercise