Page 174 -
P. 174
DOMAIN MODELING OF OBJECT-ORIENTED INFORMATION SYSTEMS 159
2. Group attached to Gymnast: “Gymnast has Name,” “Gymnast is born on Date,” “Gymnast
is of Gender,” “Gymnast belongs to Club.” Clearly, we should have the class Gymnast,
which would capture the first three fact types, and let the last one be represented by an
association between Gymnast and Club.
3. Group attached to CompetitionType: Clearly, we should have the class CompetitionType
to capture these fact types (related to gender, lower and upper age limits).
4. Group attached to EventType: “EventType has Name.” We should have the class Event-
Type to capture this fact type.
5. Group attached to Judge: “Judge has Phone.” We should have the class Judge.
6. Group attached to Meet: “Meet is on Date,” “Meet is at Location.” We should have the
class Meet.
7. Group attached to EventType: “EventType has Name.” We should have the class Event-
Type to capture this fact type.
Note: So far, the choices have been very straightforward. In fact, we do not have any other
choices. However, this is not the case for the next group of fact types.
8. Group attached to Competition: “Competition is for CompetitionType,” “Competition
is in Meet.” Obviously, we can represent these two fact types by class Competition (let
us call it choice A).
On the other hand, because a Competition is identified by the combination of Meet and Com-
petitionType, we can, if we so wish, represent the two fact types by an association between class
Meet and class CompetitionType (let us call this choice B).
Though both choices are equivalent in the sense that both resulting models allow us to store the
required information, we will prefer choice A because it represents the concept of “competition”
explicitly. It is also important to note that this “competition” concept plays an important role in
expressing other facts about the application domain (as will be seen next).
9. Group attached to Event: “Event is of Event Type,” “Event is for Competition.”
Suppose we have made choice A for the “Competition group” and have the class Competition
at our disposal. What choices can we have in this case? An obvious choice is to introduce a class
Event and represent the two fact types as associations between this class and classes EventType
and Competition (let us call this choice A for this fact type group). But we could also represent
the two fact types by an association between Competition and EventType (choice B).
Now, if we had made choice B for “Competition group” (group 8 above) and thus do not
have class Competition to work with, a possible choice would be to represent the fact types by
a ternary association between Meet, CompetitionType, and EventType (choice C). Here, the
implicit representation of the concept of “Competition” makes it harder (and messier) to capture
the concept of “event.”
Similar to the previous case, we prefer choice A, which explicitly represents the concept of
“event.”
10. Group attached to Team: A similar sort of observation applies. Our preference is to in-
troduce the class Team.
11. Group attached to Member: Similarly, we would introduce the class Member.