Logical View  «Prev 

Modeling associations Customer Order

When you model a system, certain objects will be related to each other, and these relationships themselves need to be modeled for clarity. Association is a relationship between classifiers, which is used to show that instances of classifiers could either be
  1. linked to each other or
  2. combined logically or
  3. physically
into some aggregation.

1) Start with the class diagram of Customer and Order. The association shows one customer places zero or more orders.
Start with the class diagram of Customer and Order. The association shows one customer places zero or more orders.

2) To look up a customer's orders individually, identify a field that will uniquely identify the order. The attributes reveal the ordernumber to be a unique identifier.
To look up a customer's orders individually, identify a field that will uniquely identify the order. The attributes reveal the ordernumber to be a unique identifier.

3) Place the qualifier box next to the class that will use it. The customer objects need to look up unique orders by ordernumber, so place the qualifier box next to the customer class.
Place the qualifier box next to the class that will use it. The customer objects need to look up unique orders by ordernumber, so place the qualifier box next to the customer class.

4) Next copy the ordernumber attribute name and data type and place them in the qualifier box
Next copy the ordernumber attribute name and data type and place them in the qualifier box

5) Reduce the multiplicity to show that the order number qualifier allows use to reference exactly on order at a time. The multiplicity is reduced to 1 because the qualifier is a unique value. If the qualifier is not unique then it remains zero or more (*), but the actual number of objects decreases
Reduce the multiplicity to show that the order number qualifier allows use to reference exactly on order at a time. The multiplicity is reduced to 1 because the qualifier is a unique value. If the qualifier is not unique then it remains zero or more (*), but the actual number of objects decreases.