|
applications generate a stream of information
|
|
|
![]() |
|
SQL solution on a materialized database:
SELECT notifyOperator( sum(length) ) FROM PT_backbone GROUP BY getMinute(timestamp) // per minute HAVING sum(length) > T |
|
|
it is run continuously over the "database" (input data stream) - until it is stopped explicitly
![]() |
![]() |
Query:
|
NOTE: unit is "packet" (not number of bytes in packet)
SQL-like solution:
(SELECT count(*) FROM PT_backbone AS B, PT_customer as C WHERE C.pkt_id = B.pkt_id) / (SELECT count(*) FROM PT_backbone) |
|
Conclusion:
|
![]() |
Query:
|
Here we will use the number of bytes as unit (no big deal...)
SQL-like solution:
SELECT src_addr, dest_addr, sum(length) FROM PT_backbone GROUP BY src_addr, dest_addr HAVING sum(length) = (SELECT max(sum(length)) FROM PT_backbone GROUP BY src_addr, dest_addr) |
|
X is the key of the relation
SELECT * FROM R R1, R R2 // Self-join WHERE R1.X = R2.X |
|
Processing of the continuous query is done as follows:
![]() |
|
If the continuous query processor buffers one tuple, the output will be: empty !!!
If the continuous query processor buffers two tuples, the output will be: (A,B,A,C), (A,C,A,D), ... !!!
If the continuous query processor buffers two tuple, the output will be: (A,B,A,C), (A,B,A,D), (A,C,A,D), ... !!!
|
|