Six Different Kinds of Composition

James J. Odell

Reprinted from
Journal Of Object-Oriented Programming Vol 5, No 8. January 1994
Copyright © 1994 SIG Publications, Inc, New York, NY

Also available in Advanced Object-Oriented Analysis and Design Using UML
by James J. Odell, Cambridge University Press, 1998

Composition (also referred to as aggregation) is a mechanism for forming an object whole using other objects as its parts. It reduces complexity by treating many objects as one object. This column examines the ways in which we form these whole-part associations by answering the following questions:


Linguistics, logic, and cognitive psychology have focused on understanding the nature of relationships. One important type of relationship is the association between the parts of things and the wholes they make up. In a joint paper, Morton Winston, Roger Chaffin, and Douglas Herrmann [Winston, 1987] discuss various expressions of the whole-part association:

The article by Winston et al. describes several kinds of composition (or meronymic) relationships. The kind of relationship is determined by the combination of three basic properties:

This column presents six kinds of composition based on particular combinations of these three basic properties. (A matrix illustrating this is presented at the end of this section.) The six combinations provide a reasonable guide to employing whole-part relationships.

Component-integral object composition

The most common form of composition is the component-integral object relationship.

To be a configuration, the parts are required to bear a particular functional or structural relationship to one another--as well as to the object they constitute. Some examples of this are:

In this form of composition, an integral object is divided into component parts--which are objects in their own right. Here, the components cannot be haphazardly arranged. Instead, they must bear a particular relationship to one another and to the whole they constitute. The integral object, therefore, is a whole that exhibits a patterned structure or organization. For example, musical pieces or theatrical productions have a patterned organization. We refer to "the flute part" in a woodwind quintet or a "part" in a play. Such parts are components of an integral object. Objects in this relationship, then, can be tangible (toothbrushes or carts), abstract (mathematics or jokes), organizational (the EEC or US Supreme Court), or temporal (a film showing or musical performance).

However, when a component ceases to support the overall pattern of an object, a different kind of association results. For example, if a handle were ripped from the door of a car, the handle would no longer be considered part of the car. It could, however, be considered a piece of the car. Unlike components, pieces do not participate in the overall pattern of the object. They provide no functional support for the whole and typically have arbitrary boundaries.

Material-object composition

In component-integral object relationships, parts can be removed. In material-object composition they can not.

Material-object relationships are usually expressed in terms of the word partly. A few examples are:

Component-integral object relationships define the parts of objects. Material-object relationships define what objects are made of. For example, the component-integral object relationship would specify that a car has clearly identifiable parts such as an engine and wheels. The material-object relationship would specify that a car is made of such materials as iron or that bread is made up of such ingredients as flour. Components, then, can be physically separated from an object because their relationship to the whole is extrinsic. For instance, a kitchen without a microwave oven is still a kitchen. However, a loaf of bread without flour is not bread. With material-object relationships, the relationship between the parts is no longer known once they become part of the whole.

The word partly is not a requirement of the material-object relationship. For instance, a windshield could be made entirely of glass--not just partly. Other material-object relationships require a subjective judgment. For example, can the ceramics (of the spark plugs) be removed from a car? If so, ceramics is a component-integral object relationship, instead.

Portion-object composition

The relationships presented above define a configuration of parts that are different from each other and the whole they compose. In the portion-object relationship, the parts are homeomeric, that is, the parts are the same kind of thing as the whole.

A few examples of portion-object relationships are:

Each portion or slice of bread is considered to be bread. Each slice, then, is similar to other slices in the loaf--as well as to the loaf itself. The parts in a component-object relationship are not required to be similar in this way. For instance, an engine is not similar to the car of which it is part. Furthermore, the engine is not similar to any other part of a car. A sip of coffee, on the other hand, is coffee.

Portions of objects can be divided by means of standard measures, such as inches, millimeters, liters, hours, parsecs, and so on. Therefore, a meter is part of a kilometer or an hour is part of a day. In this way, the portion-object relationship is important for the arithmetic operations of addition, subtraction, multiplication, and division.

The similarity, then, between a portion and its whole permits us to use a form of selective inheritance of properties during implementation. For example, the kinds of ingredients in a loaf of bread are the same as its portions. However, the quantity of ingredients for the loaf is not identical for each portion. The component-integral object relationship also permits certain properties of the whole to apply to the parts. For instance, the velocity of a car can also be implied as the velocity of its parts. However, since portions are similar to the whole, many more implications can be made.

Other terms that are often used in place of portion are slice, helping, segment, lump, or drop. The word piece is also used. However, care must be taken to ensure that all of the pieces are similar in nature. While the pieces of a splattered tomato are tomato, the pieces of an exploded car are not car.

Place-area composition

In the portion-object relationship, each homeomeric piece is removable. In the place-area composition, the pieces cannot be removed.

A few examples are:

This kind of composition in a relationship is usually identified between places and particular locations within them. Like the portion-object relationship, all of the pieces are similar in nature. For instance, places in California--including San Francisco--are still California. However, in place-area relationships, the places cannot be separated from the area of which they are a part.

Member-bunch composition

In the composition relationships above, the parts bear a particular functional or structural relationship to one another or to the object they comprise. Member-bunch composition has no such requirement. The only requirement is that the parts are a member of a collection.

A few examples of member-bunch relationships are:

This form of composition should not be confused with the classification relationship. For example, the following are classification relationships: Jason is a monster and Christine is a car. With classification, the set of objects for a particular object type possesses the same properties. The member-bunch relationship is different--based, instead, on spatial proximity or social connection. For a shrub to be part of a garden implies a location close to the other plants. For an employee to be part of a union implies a social connection. For these two examples to be classification relationships would mean that every employee is a union and every shrub is a garden.

Member-partnership composition

Members in a partnership define an invariant form of member-bunch composition.

A few examples of member-partnership relationships are:

Members in partnerships cannot be removed without destroying the partnership. For instance, if Ginger leaves Fred, the waltz couple no longer exists. If Stan Laurel is replaced with another person, a different partnership results.

Composition relationships and their properties

The following table illustrates the properties that apply to each of the six kinds of composition discussed above.

Component-integral objectyesnono


In the section above, six kinds of relationships were presented that express composition. Composition, however, is easily confused with many other kinds of relationships, such as spatial inclusion, classification inclusion, attribution, attachment, and possession. These noncompositional forms are discussed in this section.

Topological inclusion

Composition is often confused with containment or topological inclusion. Topological inclusion is the relationship between a container, area, or temporal duration and that which is contained. A few examples are:

Here, the subject is surrounded, though the subject is not part of the thing that surrounds it. Composition, too, has the notion of containment. For example, the lungs are surrounded by the body. Additionally, composition involves a connection between the part and the whole that goes beyond just spatial or temporal inclusion.

Topological inclusion is most commonly confused with place-area composition. An example of a place-area composition is San Francisco is part of California. San Francisco is surrounded by California, just as Monument Valley is surrounded by Arizona and Utah. However, San Francisco is also part of California, because of an additional connection between the two--every part of San Francisco is also California. In contrast, no part of Monument Valley is Arizona or Utah, because it is part of the Navaho Indian Reservation.

Classification inclusion

The extension of a concept is defined as the set of objects to which a concept applies. Therefore, we can say that Gone with the Wind is part of the set of objects to which the Book concept applies. However, we would not say that Gone with the Wind is part of a Book. Instead, we would say that Gone with the Wind is an instance of a Book. Therefore, Gone with the Wind has a classification relationship with Book, not a member-bunch relationship.

Classification relationships can be easily confused with member-bunch relationships. Both involve the membership of objects in a set of objects. However, the member-bunch relationship is determined by spatial, temporal, or social connection. In contrast, the classification relationship is based on the idea that a common concept applies to each.


The properties ascribed to an object can be confused with composition. For instance, a Lighthouse has such properties as height and weight. Therefore, height and weight can be considered as part of the properties of each Lighthouse. However, properties are not components of the object itself. Instead, they are mappings from the object to other objects. While each Lighthouse has height as a property, height is not part of a Lighthouse.


Attachment of one object to another does not guarantee composition. For example, Toes are attached to Feet and they are also part of feet. However, while Earrings are attached to ears, they are not part of Ears. For attachment to specify a component-object relationship, the component must provide functional support for the whole. While Toes provide functional support for the Foot, Earrings do not provide functional support for the Ear.


Finally, ownership is often confused with composition. For example, it is true that a Bicycle has Wheels and that the Wheels are part of the Bicycle. However, while it may be true to say that the Girl Betty has a Bicycle, saying that the Bicycle is part of Betty is not true.


A relationship is considered transitive if: whenever A relates to B and B relates to C, then A relates to C in the same manner. When relationships are transitive, valid syllogistic inferences can be made. An example of a syllogism is

Because this relationship is transitive, the conclusion can be correctly inferred from the premises. Composition relationships appear to be transitive such that: if A is part of B, and B is part of C, then A is part of C. In the following example, both premises are propositions based on the same component-integral object composition relationship:

However, keeping the same kind of composition relationship is an important factor in producing a valid composition-related conclusion. Even though the following syllogisms use only composition relationships in their premises, their conclusions are incorrect, because the kinds of composition relationship are different:

Just because the kind of relationship is different does not automatically imply that the conclusion will be incorrect. For instance, in the following example, even though premises 5a and 5b are different kinds of relationships, conclusion 5 is still correct.

premise 5a- The loaf is partly flour (material-object)

premise 5b- A slice of bread is part of a loaf of bread (portion-object)

conclusion 5- A slice of bread is partly flour

However, when the same kind of relationship is used, the conclusion is always correct. Composition is a transitive relationship. However, it is transitive only when the same kind of composition is used by the premises.

Knowing this fact is very useful when propagating operations on composition relationships. For instance, in a CAD/CAM application the user can request that a particular image of a car be rotated. Since the car is made up of many components, the rotation operation can be propagated to all parts of a car, as well. Since each component in the car can also have component-object relationships with other parts, these parts, too, can be rotated--and so on.

Another way of explaining this is by referring to premises 2a and 2b, above. Since both premises employ the same kind of composition relationship, the conclusion is correct. Therefore, since the pistons are truly part of the car, any operation applied to the car can be propagated to the pistons. However, with premises 3a and 3b this is not necessarily true. For example, giving a ten-percent pay raise to the Math Department could result in Bob getting a ten-percent raise.[*] However, since premise 3a is a different kind of composition relationship, Bob's arm is probably not a reasonable candidate for receiving a pay raise. Therefore, the number of composition levels that can be reliably propagated is based on whether the kind of composition relationship is the same. As long as this is true, the propagation can be inferred. If the kind of relationship is different, the application of propagation at each level must be examined for validity.


Composition (also referred to as aggregation) is a mechanism for forming an object whole using other objects as its parts. It reduces complexity by treating many objects as one object. This column examines six ways in which we form these whole-part associations. The six kinds of relationships are determined by combinations of three basic properties: configuration, homeomerism, and invariance.

These six kinds provide a reasonable guide to how we employ whole-part relationships. However, they also help us to identify where composition is truly transitive and where it is not. As long as the kind of composition relationship remains the same, transitivity exists and propagation of operations can be inferred. If the kind of relationship is different, the application of propagation at each level is not guaranteed and must be examined for validity.


Winston, Morton E., Roger Chaffin, and Douglas Herrmann, "A Taxonomy of Part-Whole Relations," Cognitive Science, 11, 1987, pp. 417-444.


The author would like to acknowledge Conrad Bock of IntelliCorp for providing the material on which this column is based. Additionally, I would like to thank Conrad Bock and Stevan Mrdalj for their kind and helpful comments while producing this column.


James Odell is a consultant, educator, and author. He works with Kabira, IntelliCorp, James Martin & Co., and Quoin, Inc., and can be reached by telephone at (734) 994-0833 or by email at mailbox at jamesodell dot com.

Return to Bock Online

If you have any comments on this page or problems, contact Conrad Bock (conrad dot bock at nist dot gov)