Database Reference
In-Depth Information
perature, and (iii) constraints on the returned values: filter out undesired
values, e.g., temperature readings above 100 C should be dropped for
an application monitoring the water temperatures.
For the pull-based model, a snap shot result is returned for a query.
Specifically, n 0 disseminates a query into the network. On receiving the
query, a sensor n i returns its current reading. After n 0 receives all the
responses, it generates and returns the final result at the current time
stamp to the user. As an example, a query in the pull-based model is
“reporting the current temperature on the node with ID = 2”. The
main difference between these two models is that the push-based one
returns a stream of results, while the pull-based one returns only one
result which is the snap shot of the current network status.
5.2 Basic Acquisition and Aggregation
In early WSNs, the collected data were transferred to and processed
at the base station, regardless of their usefulness. Such systems lack
flexibility and scalability [7] because: they take samples in a fixed man-
ner and, they transmit large amounts of raw data. Consequently, they
have no control on which attributes to retrieve, the range of the returned
readings, etc. Current systems provide control on the sensor's behavior
and offer various optimization opportunities. A WSN can be consid-
ered as a database that includes two sets of data: sensor meta data
and sensor sensing data. sensor meta data refer to information about
the sensors, such as the sensors' IDs, locations, and other physical char-
acteristics. Sensor sensing data are measurements collected from the
sensors over time. In COUGAR [27 28], the meta data form a relational
table R ( sensor node,location ) at the base station, where sensor node
indicates the ID of a sensor n i while location records the physical coor-
dinates of n i . The sensing data are generated by sensors at each time
stamp. COUGAR follows the sequence model introduced by Seshadri et
al. [26] and embeds each reading with the time stamp when it is gener-
ated. Given a set of tuples embedded with time stamps, a time series of
the readings is constructed by sorting the records according to the time
stamps.
COUGAR includes an SQL-like declarative language. As an example,
a query is specified in the following form:
Q2:
SELECT
R.sensor.attribute(range)
FROM
R
WHERE
condition
AND
$every(period)
The “SELECT” clause specifies that the sensors sample the specific
attribute and return only those readings falling in range. The “WHERE”
Search WWH ::




Custom Search