Some entity/relationship notations have the ability to describe an “exclusive or” arrangement of relationships. For example, Figure 3-4 shows how the Barker-Ellis notation represents the assertion:
· Each Line Item must be either for exactly one Product or for exactly one Service.
The “arc” across the relationship lines denotes this.
Figure 3-4: Exclusive Or in the Barker-Ellis Notation
Not all entity/relationship notations can show this, but, in fact, UML can. In UML, it is called an “XOR Constraint” and is shown in Figure 3-5.
Figure 3-5: Exclusive Or in UML