Databases Reference
In-Depth Information
14
ALLEN RELATIONSHIP AND
OTHER QUERIES
Allen Relationship Queries 313
Time Period to Time Period Queries 316
Point in Time to Period of Time Queries
333
Point in Time to Point in Time Queries
341
A Claims Processing Example
343
In Other Words 346
Glossary References
347
In this chapter, we examine each of the thirteen Allen relation-
ships, as well as each non-leaf node in the taxonomy of Allen
relationships which we introduced in Chapter 3. We describe
the Allen relationships as they hold between two time periods,
between a time period and a point in time, and also between
two points in time. We show how these relationships are
expressed in terms of time periods represented with the closed-
open convention, and we provide a sample query for each one.
After a section in which we illustrate how much simpler these
queries would be to express if we had a PERIOD datatype, we
conclude this chapter by discussing queries which involve tem-
poral joins.
Figure 14.1 shows our taxonomy of the Allen relationships.
Those relationships are the leaf nodes in this taxonomy. Every
leaf node has an inverse relationship, except the [equals] rela-
tionship. We italicize that relationship name to emphasize that
it has no inverse. So counting the [equals] relationship, and
the six leaf nodes and their inverses, we have the full set
of thirteen Allen relationships. We also underline the non-leaf
node relationships in the taxonomy, to emphasize that they
are relationships we have defined, and are not one of the Allen
relationships.
 
Search WWH ::




Custom Search