the theory it represents. This might be as simple as implement-
ing a personnel database with one company’s data or another
company’s data, or it might be using the data structu res to hold
another sort of data entirely.
The intended interpretation of the theory is the mapping
between the elements in the theory (in our case the entity types
and relationship types) and what they are intended to stand for.
This is where useful names and definitions come in.
Model theory is a major issue in the field of ontology in general,
because theories are often thought of in the abstract. The good
news for data modelers is that it is something we do not have to
worry about too much, because we start with an intended interpre-
tation and with the aim of being able to populate it.
6.2.4 Rules
Over the years I have noticed a range of opinions on the
extent to which rules should be included in a data model. These
range from implementing rules to the maximum extent possi-
ble, including things that you expect to change, through to only
including rules that are basic to data integrity. I fall at the latter
end of that spectrum. So my view is that you should only
include rules necessary for data integrity, or rules about the
world that cannot change, but nothing that can be changed at
management discretion. This principle applies to data models
that are going to be implemented either as application models
or as integration models. There is no problem in capturing rules
in say, a requirements data model, provided that they are going
to be filtered out as part of the analysis process. My rationale
for this is that if rules are implemented in the data structure,
then when the rules change, the data structure has to change,
and this is very expensive. In any case, only a relatively small
proportion of rules can be implemented in the data structure,
so you are going to have to use code for most rules in any case.
The application of rules in a data model is usually
restricted to cardinality constraints, and these are
quite limited. For example, a reasonable rule that
you might want to put in a data model is that if A is
a part of B, then B cannot be a part of A. But this just
cannot be expressed with cardinality constraints
alone. So for example, in Figure 6-2 you see that the
composition entity type, which represents a real-world relation-
ship, must have both a whole and a part. It just is not a composi-
tion relationship witho ut them—recording a composition
relationship with just a whole or just a part does not make sense.
physical_object
part
whole
composition
Figure 6-2 An example of
basic integrity constraints.
72 Chapter 6 SOME GENERAL PRINCIPLES FOR CONCEPTUAL, INTEGRATION, AND ENTERPRISE DATA MODELS