Database Reference
In-Depth Information
instant
all pro-
jections
to range
all time
dependent
types for
these
int
real
bool
string
moving
(
int
)
moving
(
real
)
moving
(
bool
)
moving
(
string
)
range
(
int
)
range
(
real
)
range
(
bool
)
range
(
string
)
point
points
line
region
moving
(
point
)
moving
(
points
)
moving
(
line
)
moving
(
region
)
points
line
region
all projections to
domain
periods
Figure 3.2 Type system.
the domain of
α
. So, for example,
range
(
real
) is a set of real-valued intervals;
periods
is in fact another name for
range
(
instant
). The types
range
(
α
) together
with the spatial types
points
,
line
,and
region
are sufficient to represent the
projections into the ranges for all types
moving
(
α
). Further, the values of all
types
moving
(
α
) can be projected on the time axis resulting in a
periods
value.
Hence design rule D3 is fulfilled.
The design of operations proceeds in three steps:
1. Carefully define a set of operations on the static types.
2. By a technique called
lifting
, make these operations time dependent.
3. Add some specific operations for the time-dependent types.
Lifting means to make a static operation time dependent by allowing any
(combination) of its arguments to be time dependent. For example, consider
the equality and intersection operations on two points. By lifting, the following
signatures are available.
3
=
:
point
×
point
→
bool
intersection :
point
×
point
→
point
mpoint
×
point
→
mbool
mpoint
×
point
→
mpoint
point
×
mpoint
→
mbool
point
×
mpoint
→
mpoint
mpoint
×
mpoint
→
mbool
mpoint
×
mpoint
→
mpoint
Lifted versions of these two operations are used in the last query of Section
3.2.1
.
3.2.3 Implementation
In the model described so far, the semantics of time-dependent types, that is,
of types
moving
(
α
), have been simply defined as partial functions, disregarding
3
We generally abbreviate the formally defined notation
moving
(
α
)by
m
α
.