Databases Reference
In-Depth Information
Chapter 20
Practical Guidelines
for Supertype and
Subtype Modeling
Richard E. Biehl
W
,
HEN
DATA
MODELERS
DEFINE
AN
ENTITY
THEY
DESCRIBE
A
SET
OF
ELE-
MENTS
THAT
SHARE
COMMON
CHARACTERISTICS
DEFINED
BY
THE
'
ENTITY
S
ATTRIBUTES
AND
THE
RELATIONSHIPS
THAT
ASSOCIATE
IT
WITH
.
OTHER
In addition, when data modelers define a subtype entity,
they define it as a subset of the supertype entity instances. Supertype and
subtype modeling is based on basic set theory and many of its uses and
problems can be discerned by examining simple sets.
ENTITIES
SIMPLE SETS
The starting point is always a base set, like the set of values that can
result from the roll of a pair of dice — S
= {2,3,4,5,6,7,8,9,10,11,12}. A subset
0
of S
might be the values that can result from rolling doubles (i.e., the same
value on each die) — S
0
is created by includ-
ing those values that can be achieved only through rolling doubles —
S
= {2,4,6,8,10,12}. A subset of S
1
1
= {2,12}. There can be no members in S
that are not in S
; nor can there
2
2
1
be members of S
. The criteria for membership in the sub-
set includes membership in the superset as well as additional criteria that
limit the subset to only the desired elements.
that are not in S
1
0
In data modeling, few entities are defined by simply listing every possi-
ble occurrence; they must be defined algebraically. The set that represents
dice rolls is defined as S
= {1<X>13}. The subset S
is defined as S
= {S
{X},
0
1
1
0
Even(X)}. The subset S
cannot be defined by exclusive reference to the
2
superset S
can only be defined by accessing knowledge out-
side of the set. In this case, the outside knowledge consists of the dice
structure and what combinations are possible when the two dice are
rolled. This set might be defined as R = {(1,1),(1,2),(1,3)…(6,6)} or algebra-
ically as R = {(X,Y),0<X>7,0<Y>7}. The set S
. The subset S
1
2
is actually an intersection of
2
sets S
and R and the value in S
can only be achieved by a single set
1
1
Search WWH ::




Custom Search