What does it mean when you have something as the following picture?
alt text http://img710.imageshack.us/img710/3876/3gmygrextht5dsd2c4svh1i.png
Each Customer has none, one or more Orders while each Order has only one Customer?
And in relationship to the following one:
alt text http://img28.imageshack.us/img28/4372/bod24yjzahqjlnrvjtfezax.png
What does the black diamond mean in this context? How is that black diamond called?
Thanks
In the first picture, an
Ordercan only be associated to oneCustomer, while oneCustomercan have manyOrder‘s.The black diamond in the second example is called a composition, or an associated relationship. Composition usually has a strong life cycle dependency between instances of the container class and instances of the contained class or classes. In your case
Orderis the container class and theCustomeris its contained class.Reference: