7. Define bindings, role cardinalities and constraints
Define constraints
- a number of roles or relationships an object can participate in
- “View from the object”
- defined either for a role type or a relationship type
- Examples:
- Defined for a role type: single inheritance
- a class can participate at most in one Specialization role.
- Note: a class can participate in many Generalization roles as it can have several subclasses.
- Defined for a relationship type: Object instance
- an object can be only in one instantiation relationship