Association
Association is the relationship in which each object has its own life cycle but have no ownership. It is a weak relationship.
For example Teacher and Student relationship. A teacher can have more than one teacher and one student can have more than one teachers. So there is no ownership.
Aggregation
It is a stronger relationship. It is a specialization of Association. Objects have their own life cycle but there is ownership. Let's take example of Teacher and Department. A department has many teachers but a teacher can have only one department. If we delete the department then teacher would exist.
No comments:
Post a Comment