On this webpage which shows how to draw a class diagram, why is the arrow for association pointing from order to customer, and not from customer to order?
7 Answers
Its because an order "has a" reference to a customer.
In a database, this would be a foreign key in the order-table, which stores the customer-id.
In code, you would store a reference to the associated customer object in an order object. So the order is pointing to the customer and not vice-versa.

- 10,486
- 14
- 51
- 81
-
2Why we shouldn't decide `customer` has many `order`s and add collection reference of order to customer? – Iman Mahmoudinasab Jan 06 '14 at 17:12
-
8this should be the right answer others never explained what navegability is – Geomorillo Aug 28 '18 at 13:24
The arrows describe navigability.
- Navigable end is indicated by an open arrowhead on the end of an association
- Not navigable end is indicated with a small x on the end of an association
- No adornment on the end of an association means unspecified navigability
Taken from: http://www.uml-diagrams.org/association.html

- 10,236
- 6
- 45
- 66
This might help:
UML Class Diagrams: Guidelines: http://msdn.microsoft.com/en-us/library/dd409416%28VS.100%29.aspx
Properties of an Association
Is Navigable: If true for only one role, an arrow appears in the navigable direction. The association can be read in this direction. You can use this to indicate navigability of links and database relations in the software.
Properties of Associations in UML Class Diagrams: http://msdn.microsoft.com/en-us/library/dd323862%28VS.100%29.aspx
If one role is navigable and the other is not, an arrow appears (7) on the association in the navigable direction.

- 21,988
- 13
- 81
- 109

- 8,276
- 4
- 27
- 25
The arrows describe the ways you can navigate. So in this diagram you can go from order to customer. And for the other way: no arrow means NOT "not navigable", but "no comment". There is no definite right way to do it.

- 6,396
- 4
- 29
- 25
Association ends have a boolean navigability property in UML. In this case, the navigability in the direction order to customer is set to true while the navigation in the direction customer to order is set to false.
With this, the designer of the model expresses that orders now who is the customer associated with the order but customers do not have direct access to their orders.
If we look at the Java code for this model, navigability it is easier to understand. For this example, this navigability means that Order has an attribute of type Customer but Customer has no collection attribute to store his/her orders

- 8,058
- 2
- 33
- 39
-
associations do not always correspond to UML attributes and definitely do not correspond to attributes on Java classes (there's no such thing in Java, so using 'attribute' in a Java context could mean field or property or bean property). – Pete Kirkham Dec 20 '09 at 16:27
Possibly because an order is associated with a customer? These kind of things can be seen as working either way, or sometimes both.
-
1I know they're associated with each other. The question is not why there is an arrow, it is about the direction of the arrow. – neuromancer Dec 15 '09 at 10:33
-
They are not associated with each other - an order is associated with a customer. – Dec 15 '09 at 10:51
-
It's a dependency, which is a special weak type of association. It means that for an order to exist, there must exist a customer at some point in time. There may be some point in the lifecycle of "order" where this requirement is not enforced.

- 115,121
- 27
- 131
- 155
-
This is not a dependency. A dependency is not a special typ of association, it is a special type of Relationship (in the same way as association is another type of Relationship) – Jordi Cabot Dec 15 '09 at 11:24