Presentation is loading. Please wait.

Presentation is loading. Please wait.

ATLaS: A Complete Database Language for Streams Carlo Zaniolo, Haixun Wang Richard Luo,Jan-Nei Law et al. Documentation and software downloads:

Similar presentations


Presentation on theme: "ATLaS: A Complete Database Language for Streams Carlo Zaniolo, Haixun Wang Richard Luo,Jan-Nei Law et al. Documentation and software downloads:"— Presentation transcript:

1 ATLaS: A Complete Database Language for Streams Carlo Zaniolo, Haixun Wang Richard Luo,Jan-Nei Law et al. Documentation and software downloads: http://wis.cs.ucla.edu/ http://wis.cs.ucla.edu/

2 DB-Inspired Approach to Streams The Good: –Information-centered, high level Query languages, Data Independence, Optimization, … –isolate applications from details, amortize investment The Bad: SQL lacks expressive power! –New application domain  ad-hoc extensions (by committee) –Designed for secondary store  blocking aggregates assumed The Ugly : –The secondary storage mantra is gone –Can SQL designed for secondary store win over languages such as XQuery, XSLT or Hancock designed for the –web and streams—and also claiming Turing completeness?

3 A Brave New World Just extending SQL for streams will not do, if – SQL remains crippled by its impotency in expressing applications –and we will lose out against non-DB approaches since we lost our DB mantra and home field advantage

4 A Brave New World User-Defined Aggregates (UDAs) are a path to salvation because they, –Can be defined in SQL (rather than in a procedural language) –Turn SQL into a Turing Complete (TC) language – Fit the stream-oriented computation model like a glove—e.g., non-blocking properties of queries can be characterized syntactically ATLaS does all that, and demonstrates the effectiveness of UDAs in expressing data-intensive applications, and delivers good performance.

5 UDAs: Initialize, Iterate, Terminate AGGREGATE myavg1(Next Int) : Real { TABLE state(sm Int, cnt Int); INITIALIZE : {INSERT INTO state VALUES (Next, 1)} ITERATE : {UPDATE state SET sm=sm+Next, cnt=cnt+1;} TERMINATE : {INSERT INTO RETURN SELECT sm/cnt FROM state;} } AGGREGATE myavg2(Next Int) : Real { TABLE state(sm Int, cnt Int); INITIALIZE : {INSERT INTO state VALUES (Next, 1)} ITERATE : {UPDATE state SET sm=sm+Next, cnt=cnt+1; INSERT INTO RETURN SELECT sm/cnt FROM state WHERE Cnt=100; UPDATE state SET sm=0, cnt=0 WHERE Cnt=100} } No TERMINATE  Non-Blocking

6 Homework Problems: Solutions in Two Flavors 1.without windows (ATLaS is TC for both blocking and nonblocking functions), and 2.with windows [partition&range construct] ATLaS provides constructs to simplify the definition of UDAs on windows, But ATLaS does not support joins of windows,since a. Problems when windows are viewed as data sets, b. in SQL:1999 windows are aggregate modifiers (OLAP), c. Simple solutions are already at hand in the TC ATLaS. The benefits of TC: we add a new construct only when pros >> cons

7 Interesting Times Ahead … Language Design Issues: Semi-structured information and XML documents— can they be viewed as streams? Ditto for references, Streams of Updates and Events, active databases Applications: e.g., micro-climate monitoring, from UCLA Embedded Networked Sensors Center. Bridging the gap will not be easy.

8 References Stephan Kepser: A Proof of the Turing-completeness of XSLT and Xquery, SFB 441, University of Tubingen Technical Report, SFB 441, May 13, 2002, kepser@sfs.uni-tuebingen.de


Download ppt "ATLaS: A Complete Database Language for Streams Carlo Zaniolo, Haixun Wang Richard Luo,Jan-Nei Law et al. Documentation and software downloads:"

Similar presentations


Ads by Google