SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 464 | Next

Yingshu Li, My T. Thai, and Weili Wu

"Wireless Sensor Networks and Applications"

predicate is the query condition.
gb??’list is an attributes list. command??’name is a trigger operation. param
is the parameters of trigger. time is the value of time. TRIGGERACTION
is the subordinate clause which defines the trigger. It determines the operations
executed when WHERE clause is satisfied. EPOCH DURATION
defines the query cycle. The meaning of the other clauses is the same as SQL.
Following is an example of a TinyDB query.
SELECT room no, AVERAGE(light), AVERAGE(volume)
FROM sensors
GROUP BY room no
HAVING AVERAGE(light) > l AND AVERAGE(volume) > v
EPOCH DURATION 5min
The meaning of the query is detecting rooms per five minutes in which
the average light exceeds threshold 1 and the average temperature exceeds
threshold v, and returning the room ID and its average light and temperature.
Currently, the functions of TinyDB are very limited. Some functions supported
by SQL are not supported by TinyDB.
??? The WHERE and HAVING clauses only contain simple conjunctions over
arithmetic comparison operators, string matching comparisons (SQL??™s
LIKE and SIMILAR constructs). There is no support for the Boolean
operators OR and NOT.
??? There is currently no support for sub-SELECTs (subqueries).
??? There is currently no support for column renaming (SQL??™s AS construct)
in the gb ??’ list.
??? Arithmetic expressions are currently limited to the form column op constant,
where op is one of {+,??’, ?¤, /}.


Pages:
452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476