instance of equipment type. We already saw in the
Venn diagram of Figure 5-3 that pump is a subtype
of equipment item. However, there is no way to
show this in the data model when pump is repre-
sented as an instance of equipment type. That is,
there is no way to link the pump instance of equip-
ment type to the entity type equipment item. The
full set of relationships is illustrated in Figure 5-6,
but this is not an entity-relationship model.
By the way, equipment item is also an instance
of eq uipment type, and this cannot be shown in the
entity-relationship diagram either. However, you can make an
instance of equipment type that replicates the entity type
equipment item, and then you can add a specialization rela-
tionship to equipment type and show at the instanc e level that
pump is a subtype of equipment item, just as at the data model
level you can add an entity type called pump as a subtype of
equipment item.
5.1.3 Understanding the Limitations
It is important that you understand the limitations I just
described. They will influence how you choose to model a par-
ticular situation so that you are able to say the things that are
most important.
5.1.4 Data Model vs. Reference Data
A key choice then is in deciding which things are represented
as entity types, and which things are represented as instances of
entity types. Of course only classes (things that have members or
instances) can be entity types, but you can model classes either
as entity types or as instances of entity types. Deciding where to
draw the line is an important decision, since it can significantly
impact how understandable your data model is
and how fle xible it is (how stable it is in the face of
changing requirements).
As an example, Figure 5-7 shows two ways in
which you can show that P101 is a pump. In the
first case, P101 is an instance of the entity type
pump. In the second case P101 is classified by an
instance of equipment_type.
Notice that there is no way in the second case
to show that pump is a subtype of the entity type
equipment_item. You can also see that the entity
pump
equipment item equipment type
classification
specialization
Figure 5-6 The relationships between
equipment item, equipment type, and pump.
equipment_
item
equipment_
item
pump P101
P101, pump
equipment_
type
pump
classified by
Figure 5-7 The difference between representing
pump as an entity type or as reference data.
54 Chapter 5 SOME OBSERVATIONS ON DATA MODELS AND DATA MODELING