1 / 8

DB-Inspired Approach to Streams

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/. DB-Inspired Approach to Streams. The Good:

Télécharger la présentation

DB-Inspired Approach to Streams

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ATLaS:A Complete Database Language for Streams Carlo Zaniolo, Haixun WangRichard Luo,Jan-Nei Lawet al.Documentation and software downloads: 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. 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 UDAs: Initialize, Iterate, Terminate

  6. Homework Problems:Solutions in Two Flavors • without windows (ATLaS is TC for both blocking and nonblocking functions), and • 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

More Related