Databases Reference
In-Depth Information
Time Period Relationships
Along a Common Timeline
Excludes
Meets
Meets
|-|-----|
Figure 14.20 T
1
[meets] P
1
.
between two time periods expressed as pairs of dates using the
closed-open convention, is:
(eff_end_dt
¼
T
1
)
It says that P
1
ends immediately before T
1
.
It follows that to pick out those versions, or episodes which
are contiguous with a given point in time, the predicate is:
(T
1
þ f
CTD(1)
¼
eff_beg_dt) OR (eff_end_dt
¼
T
1
)
Consider the following request for information: which
policies began at the same time the 2009 Diabetes Management
Wellness Program ended?
The SQL written to fulfill this request is:
SELECT * FROM V_Allen_Example
WHERE wp_epis_end_dt
¼
pol_eff_beg_dt
P
1
[
excludes
] T
1
This not an Allen relationship. It is the node in our taxonomy
of Allen relationships which includes the [before], [before
1
],
[meets] and [meets
1
] relationships.
The predicate for this relationship is:
(T
1
þ f
CTD(1))
<¼
eff_beg_dt) OR (eff_end_dt
<¼
T
1
)
It says that P
1
starts after T
1
or ends before T
1
. Note that if a
time period's effective end date is T
1
, that time period ended
the day before T
1
.
Consider the following request for information: which
policies ended anytime before the 2009 Diabetes Management
Wellness Program began or started anytime after the 2009 Diabe-
tes Management Wellness Program began? Note that this is not