Databases Reference
In-Depth Information
Time Period Relationships
Along a Common Timeline
Intersects
Fills
Occupies
Aligns
During
|-|
|------------|
Starts
Finishes
|-|
|------------|
|-|
|-----------|
Figure 14.18 T
1
[occupies] P
1
.
It says that P
1
occupies T
1
just in case P
1
starts on or before T
1
and ends on or after T
1
.
Consider the following request for information: which
policies began on or before the 2009 Diabetes Management
Wellness Program started, and ended on or after it started?
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_eff_beg_dt)
T
1
[before] P
1
The predicate for this relationship, as it holds between a
period of time expressed as a pair of dates using the closed-open
convention, and a point in time, is:
(T
1
þ f
CTD(1)
eff_beg_dt)
<
It says that P
1
starts at least one clock tick after T
1
; similarly T
occurs at least one clock tick before P
1
starts.
The inverse of this relationship is: P
1
[before
1
]T
1
. In this
superscripted relationship, the time period is later than the point