Databases Reference
In-Depth Information
and to rely on the end users to understand that mess as they
interpret their reports and query results, and as they write their
own queries.
Experienced data modelers may recognize that what is
wrong with this taxonomy is that it mixes types and roles. This
distinction is often called the distinction between exclusive and
non-exclusive subtypes, but data modelers are also familiar
with roles, and non-exclusive subtypes are how roles are
implemented in a data model. In a hierarchy of roles, things
canplaymultiplerolesconcurrently; but in a hierarchy of
types, each thing is one type of thing, not several types.
Jointly Exhaustive
It is important that the child nodes directly under a parent
node are jointly exhaustive . If they aren't, then there can be
instances of a node in the hierarchy that are not also instances
of any of its immediate child nodes, for example an organization,
in Figure 2.1 , that is neither a supplier, nor the company itself,
nor a customer. This makes that particular node a confusing
object. Some of its instances can be found as instances of a node
directly underneath it, but others of its instances cannot.
So suppose we have an instance of the latter type. Is it really
such an instance? Or is it a mistake? Is an organization without
any subtypes really a supplier, for example, and we simply forgot
to add a row for it in the Supplier table? Or is it some kind of
organization that simply doesn't fit any of the three subtypes of
Organization? If we don't have and enforce the jointly exhaustive
rule, we don't know. And it will take time and effort to find out.
But if we had that rule, then we would know right away that
any such situations are errors, and we could move immediately
to correct them (and the code that let them through).
For example, consider again our taxonomy containing the
three leaf nodes of Supplier, Self and Customer. This set of orga-
nization subtypes is based on the mental image of work as trans-
forming material of less value, obtained from suppliers, into
products of greater value, which are then sold to customers.
The price paid by the customer, less the cost of materials, over-
head and labor, is the profit made by the company.
Is this set of three leaf nodes exhaustive? It depends on how
we choose to interpret that set of nodes. For example, what
about a regulatory agency that monitors volatile organic com-
pounds which manufacturing plants emit into the atmosphere?
Is this monitoring agency a supplier or a customer? The most
likely way to “shoe-horn” regulatory agencies into this three-part
 
Search WWH ::




Custom Search