views:

91

answers:

2

Assume I have a composite relationship, say a Customer having a collection of Orders (and assuming an Order cannot exist without an "owning" Customer.) So, I'm not talking about aggregation.

What terms are used to describe the roles in this relationship? I might say the Customer is the "owner" of an Order and maybe the Order is "owned", but surely there are better terms, terms that can be stated without referring to the other role.

I'm trying to determine these terms so I can propertly name attributes in a meta model. I can "make something up", but would like to use names that will be easily understood.

Thanks in advance for suggestions and/or pointers to definitive sources.

Bill

A: 

This is also called the "has a" relationship. The Customer object "has a" collection of Order objects. Where as in inheritance, you'd say the Customer "is a" Person. You could also say the collection of Orders is a field or member or whatever you're language calls member variables. You'd just call the Customer an object (or a composite type). Most classes are composite types anyway, unless there's no state (i.e. just methods/behavior).

Mark A. Nicolosi
This doesn't answer the question however. I know *what* composition is. I'm trying to determing the Right Terminology when referring to the objects that participate in the relationship. You're doing a nice job of explaining *what* composition is; however I already know that! Thanks for the post in any case.
I thought my post mostly dealt with what things are called, but what I was getting at is there's lots of "unofficial" terminology to name parts of composition. A type that is composed of other objects is an *object*, the objects that make up that composition are *members* or *fields*, I'd call it whatever your language calls them or are comfortable with. It's not a coincidence that it's the same terms to OOP languages use. OO is all about composition if you are doing right.
Mark A. Nicolosi
I thought my post mostly dealt with what things are called, but what I was getting at is there's lots of "unofficial" terminology to name parts of composition. A type that is composed of other objects is an *object*, the objects that make up that composition are *members* or *fields*, I'd call it whatever your language calls them or are comfortable with. It's not a coincidence that it's the same terms OOP languages use. OO is all about composition if you are doing right
Mark A. Nicolosi
(Apparently I can't remove my own comments anymore... can some people vote for the top comment to be removed... and then this one? Thanks)
Mark A. Nicolosi
A: 

You want the "has a" relationship; our thing "has a"nother thing attached, as opposed to inheritance of "is a" relationship. You can build fairly robust models around just those two relationships. But.

To postulate further, in Topic Maps (since we're talking about meta models) we have a few in-built relationships which also has global identifiers (which you could use for global knowledge / data exchange), which are the supertype-subtype (denotes hiearchies) and the type-instance (denotes typification, a strongly typed "is a") relationships. These are fairly global (meaning, also outside the Topic Maps world). Have a look at the end of the Topic Maps Data Model for more on this.

AlexanderJohannesen
Please see my comment on Mark's answer above. Ditto here. Thanks for the response.
Sorry, but you're wrong; this is not what composition is about. Maybe you're confused because "has a" and "is a" sounds so much like a real phrase? Unfortunately, that's what they are called, even if it may be too real-life for you. :) Sorry.
AlexanderJohannesen