Databases Reference
In-Depth Information
It says that P 1 doesn't start after P 2 and doesn't end before P 2 .
The idea behind it is that it includes every relationship in which
every clock tick in P 2 is also in P 1 . Throughout the topic, when-
ever P 1 [fills 1 ]P 2 , we will say that P 1 is filled by P 2 .
Note that in the case where both begin dates are identical,
and both end dates are identical, P 1 both fills and is filled by P 2 .
This is a particularly useful group of Allen relationships
because a parent and child in a temporal relationship satisfy
temporal referential integrity just in case the child's time period
[fills] the parent's time period.
Consider the following request for information: which policies
began on or after the Diabetes Management Wellness Program for
2009 began, and also ended on or before that program ended?
The SQL written to fulfill this request is:
SELECT * FROM V_Allen_Example
WHERE pol_eff_beg_dt wp_eff_beg_dt
AND pol_epis_end_dt wp_epis_end_dt
P 1 [overlaps] P 2
This is a pair of relationships, one the inverse of the other.
In the non-superscripted relationship, the first time period is
the earlier one. The predicate for this relationship, as it holds
between two time periods expressed as pairs of dates using the
closed-open convention, is:
(eff_beg_dt 1 <
eff_beg_dt 2 )
AND (eff_end_dt 1 >
eff_beg_dt 2 )
AND (eff_end_dt 1 <
eff_end_dt 2 )
It says that P 1 starts before P 2 starts and ends after P 2 starts
but before P 2 ends.
Time Period Relationships
Along a Common Timeline
Intersects
Overlaps
|----------|
|----------|
Figure 14.9 P 1 [overlaps] P 2 .
Search WWH ::




Custom Search