Has-a

From Wikipedia, the free encyclopedia

In database design and object oriented program architecture, Has-a is a relationship where one object (often called the composited object) "belongs" to (is a part or member of) another object (called the composite type or composite type), and behaves according to the rules of ownership. Multiple Has-a relationships will combine to form a possessive hierarchy. This is contrasted with an Is-a relationship which constitutes a different kind of hierarchy (subtyping). The decision whether the most logical relationship for an object and its subordinate is not always clearly Has-a or Is-a. Confusion over such decisions have necessitated the creation of these metalinguistic terms.

[edit] See also