Example

Here is an example based on N Associations. The example there is repeated here for reference.

The example has five associated classes: A, C, and E each have one association, B has three associations, and D has two associations:

Pass0: manager multiplier is set to 1, multipliers for each end are set to 1, and initial cardinalities Ci are calculated:

endAB/AAB/BBC/BBC/CBD/BBD/DDE/DDE/E
Ci
23233532

Pass 1, step1: For managers that have more than 1 end, a size is calculated for its ends (Starget). Note that managers A, C, and E have just 1 end, and so are not involved in this pass:

managercalculationStarget
A
BLCM(AB/B, BC/B, BD/B) = LCM(3, 2, 3)6
C
DLCM(BD/D, DE/D) = LCM(5, 3)15
E

Pass 1, step2: update multipliers for each end, for each manager (Mi = Starget / Ci):

managerendStarget / Ci Mi
A
BAB/B6/32
BC/B6/23
BD/B6/32
C
DBD/D15/53
DE/D15/35
E

Pass 2: If the manager has more than one end, then look at each end, and update manager's multiplier with end's peer's multiplier. In the table below, the change to a manager's multiplier is cumulative, reading down.

managerendpeerpeer's

multiplier
manager's

new multiplier
A
BAB/BAB/A11
BC/BBC/C11
BD/BBD/D33
C
DBD/DBD/B22
DE/DDE/E12
E

Pass 3: If the manager has more than 1 end, it multiplies each end's multiplier by its own multiplier. This reconciles the ends of all managers that are multiply associated.

managerendend's

multiplier
manager's

multiplier
end's new

multiplier
A
BAB/B236
BC/B339
BD/B236
C
DBD/D326
DE/D5210
E

Pass 4: If the manager has just 1 end, it multiplies the end's multiplier (which is 1 by default) by the end's peer's multiplier. This reconciles the end in all managers with just one association.

managerendend's

peer
end's new

multiplier
AAB/AAB/B6
B
CBC/CBC/B9
D
EDE/EDE/D10

The resulting cardinality, multiplier, and size are shown in the next table. For each pair of ends in an association, the sizes bear the same ratios as the cardinalities. For example, for association AB, the ratio of sizes AB/A:AB/B = 12:18 = 2:3, which is the ratio of the cardinalities for these ends. These sizes also agree with the results from N Associations.

managerendcardinalitymultipliersize
AAB/A2612
BAB/B3618
BC/B29
BD/B36
CBC/C3927
DBD/D5630
DE/D310
EDE/E21020