Databases Reference
In-Depth Information
ad hoc query
Description: a query which is not embedded in an application program, and
which is not run as part of the IT production schedule.
Comments:
￿ These queries are usually written by business researchers and analysts,
and are often run only a few times before they are discarded. Thus the
cost of writing them is amortized over only a few occasions on which they
are used, and so it is important to keep the query-writing costs as low as
possible. This is why we recommend that, as far as possible, ad hoc
queries should be written against views.
See also: production query .
Allen relationship taxonomy
Description: a taxonomy of Allen relationships, developed by the authors and
presented in Chapter 3.
Comments:
￿ Our Mechanics definitions of the Allen relationships will express time
periods as date pairs, using the closed-open convention. The two time
periods will be designated P 1 and P 2 , and the begin and end dates,
respectively, eff_beg_dt 1 and eff_end_dt 1 , and eff_beg_dt 2 and eff_end_dt 2 .
By convention, P 1 is the earlier of the two time periods when one is earlier
than the other, and is the shorter of the two time periods otherwise.
￿ These definitions assume that the begin date value for a time period is
less than the end date value for that time period. This assumption
excludes non-sensical time periods that end before they begin. It also
excludes empty time periods .
￿ Our Semantics definitions of the Allen relationships will be stated in
terms of clock ticks contained or not contained in time periods, and so
these definitions are independent of the convention chosen for using
pairs of dates to delimit time periods. In particular, “begin”, “end”,
“earlier”, “later” and other terms refer to relationships in time, not to
comparisons of begin and/or end dates to other begin and/or end dates.
￿
Boolean operators (AND, OR, NOT) are capitalized.
Allen relationship, [ aligns ]
Mechanics: P 1 and P 2 [ align] if and only if
((eff_beg_dt 1 ¼ eff_beg_dt 2 ) AND (eff_end_dt 1 < eff_end_dt 2 ))
OR ((eff_beg_dt 1 > eff_beg_dt 2 ) AND (eff_end_dt 1 ¼ eff_end_dt 2 ))
AND NOT((eff_beg_dt 1 ¼ eff_beg_dt 2 ) AND (eff_end_dt 1 ¼ eff_end_dt 2 )).
Semantics: P 1 and P 2 [ align ] if and only if they either start or end on the same
clock tick, but not both.
Allen relationship, [before]
Mechanics: P 1 is [before] P 2 if and only if (eff_end_dt 1 < eff_beg_dt 2 ).
Semantics: P 1 is [before] P 2 if and only if the next clock tick after P 1 is earlier than
the first clock tick in P 2 .
Allen relationship, [before 1 ]
Mechanics: P 1 is [before 1 ]P 2 if and only if (eff_beg_dt 1 > eff_end_dt 2 ).
Semantics: P 1 is [before 1 ]P 2 if and only if the first clock tick in P 1 is later than
the next clock tick after P 2 .
Allen relationship, [during]
Mechanics: P 1 is [during] P 2 if and only if (eff_beg_dt 1 > eff_beg_dt 2 ) AND
(eff_end_dt 1 < eff_end_dt 2 ).
Search WWH ::




Custom Search