RationalDB   Tweet
OOPortal RedhatLinuxSysAdmin



Warning: include(../../160By600m.php): failed to open stream: No such file or directory in /home/ooport7/public_html/rationaldb.com/unified-modeling-language/nav.php on line 11

Warning: include(../../160By600m.php): failed to open stream: No such file or directory in /home/ooport7/public_html/rationaldb.com/unified-modeling-language/nav.php on line 11

Warning: include(): Failed opening '../../160By600m.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ooport7/public_html/rationaldb.com/unified-modeling-language/nav.php on line 11
Lesson 7 Modeling associations, continued
Objective Define the notation for three variations on associations: reflexive, qualified, and association classes.
In addition to the basic associations we just covered, the UML supports reflexive and qualified associations and association classes.
Reflexive association
The reflexive association is used when objects in the same class can be associated. The entire association notation remains the same, except that the association line is drawn to and from the same class.
Both examples below are equivalent expressions; one uses roles, whereas the other uses an association name:
Reflexive association

Association class
Association classes are used to identify information about an association. The information is placed in a class attached to the association that it describes by a dashed line.
Association class
Be on the lookout for association classes when you see a multiplicity of more than one used on both ends of the association.
Qualified association
Qualified associations provide the same functionality as indexes. The notation has a bit of a twist, so pay attention. To indicate that a customer can look up an order using the order's ordernumber attribute, the ordernumber attribute name is placed in a rectangular box on the Customer end of the association. All the other association notation remains intact but is pushed out to the edge of the rectangle. Also, because the qualifier is an attribute, it may include a data type.
Qualified association

Use qualifiers to reduce the multiplicity in the same way you would use indexes in a database. Note in the example how the multiplicity for Order changed from 0..* to 1 because the qualifier provided a unique key for Order.
Image
Customer Order Modeling Associations
In the next lesson, you will learn about aggregation and composition associations.
UML Class Elements
Click the link below to read about the elements of a class diagram.
UML Class Elements

Diagrammatic Class Diagram - Example
Click the link below to read about and view identifying elements of a class diagram.
Diagrammatic Class Diagram - Example