Suppose temperatures are real numbers chosen uniformly and


In Example 23.11 we observed that if all we wanted was the maximum of N temperature readings in a sliding window of time-temperature tuples, then when a reading of t arrives, we can delete immediately any earlier reading that is smaller than t.

a) Does this rule always compress the data in the window?

b) Suppose temperatures are real numbers chosen uniformly and at random from some fixed range of values. On average, how many tuples will be retained, as a function of N?

Example 23.11

Suppose we would like to know, for each sensor, the highest recorded temperature to arrive at the DSMS in the past hour. We form the appropriate time-based window and query it as if it were an ordinary relation. The query looks like:

1640_256c7d9f-da10-49d0-b814-9ec6e417fe22.png

This query can be issued as an ad-hoc query, in which case it is executed once, based on the window that exists at the instant the query is issued. Of course the DSMS must have made available to the query processor a window on Sensors of at least one hour's length.2 The same query could be a standing query, in which case the current result relation should be maintained as if it were a materialized view that changes from time to time. In Section 23.4.5 we shall consider an alternative way to represent the result of this query as a standing query.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Suppose temperatures are real numbers chosen uniformly and
Reference No:- TGS01595859

Expected delivery within 24 Hours