Search code examples
javaumlrelationshipclass-diagrammultiplicity

UML - Cardinality and diamond relation diagram explaination


I have this relation:

A Email is sent to multiple Contacts so:

Email ♢---(has)------------- Contacts

Given that Contacts can be contained in many emails and Emails can contain many contacts, then:

Email ♢ (0..*)--------(1..*) Contacts

Is it correct? Can I now read Email contains multiple Contacts and Contacts are contained in 0 or more emails?


Solution

  • The cardinality is right. I'd lose the diamond though, there's no need for it. What you have is a straight many:many binary association. Aggregation is not a particularly helpful adornment, see here for an explanation.

    hth.