Databases Reference
In-Depth Information
Question 1: In this chapter we have shown how certain operators that
apply to intervals in general can be especially useful for time intervals in
particular. Are there other possible applications of these operators, involving
intervals that are not intervals in time?
Here are some suggestions. Animals vary according to the range of fre-
quencies of light and sound waves to which their eyes and ears are receptive.
Various natural phenomena occur and can be measured in ranges in depth
of soil or sea, or height above sea level. That tea is taken between the hours of
4 P.M. and 5 P.M. is a temporal observation, but one that is significantly dif-
ferent in kind from the examples discussed previously (how, exactly?). No
doubt you can think of many similar examples on which interesting database
applications might be based.
Question 2: Are there any realistic examples of relations with more than
one interval attribute, temporal or otherwise?
Animals vary according to the range of frequencies of light and sound
waves to which their eyes and ears are receptive. Besides, as soon as we wish
to join two temporal relations R1{A,B } and R2{A,C }, where B and C are
interval attributes, we obtain a result, even if just an intermediate one, that
has more than one interval attribute.
Question 3: Can you think of an example of a relvar with an interval
attribute that you would not want to keep in coalesced form?
Actually, we have not been able to think of any compelling examples,
but perhaps the reader can do better.
5.13
Summary
We began this chapter with reference to the growing requirement for data-
bases to contain historical as well as current data. We showed that represent-
ing historical data using only timestamps leads to severe difficulties—in
particular, it makes certain constraints and certain queries very hard to deal
with—and we proposed the use of scalar (encapsulated) intervals as a bet-
ter approach. To be specific, we proposed an INTERVAL type generator,
together with several new operators for dealing with interval data (though
we remind you that almost all of those operators are really just shorthand).
Intervals and their related operators are useful for more than just temporal
data per se—despite the fact that our running example was based specifi-
cally on the type INTERVAL(DATE). We showed examples of temporal
Search WWH ::




Custom Search