What does a diamond sign signify in UML class diagrams?

Solution 1:

If there is no diamond, then we have a simple association.

If the diamond is left empty, it signifies it is an aggregation. This relation is stronger than a simple association. In this case a Customer aggregates Orders.

If the diamond is black, this means it is a composition, which is even stronger than an aggregation because the aggregated class cannot be aggregated by other classes. Its "life" depends on the container.

I think it's explained a little bit more clearly, at:

  • Ezra, Aviad (May 28, 2009) "UML Class Diagram: Association, Aggregation and Composition"

Solution 2:

The customer and order is a "has-a" composition relationship because if the customer ceases to exist so does his/her order. Therefore, there is a life cycle dependency between the container (customer) and the instances within that container (order). When the container ceases to exist so does all its instances.

On the other hand, if we say a customer has a book. In this case, we have a "has-a" aggregation relationship. Because if the customer ceases to exist, the book is still available.

Solution 3:

It signifies aggregation. From wikipedia:

In UML, it is graphically represented as a hollow diamond shape on the containing class end of the tree with a single line that connects the contained class to the containing class.The aggregate is semantically an extended object that is treated as a unit in many operations,although physically it is made of several lesser objects.

http://en.wikipedia.org/wiki/Class_diagram