Presentation is loading. Please wait.

Presentation is loading. Please wait.

11/08/2002WIDM20021 An Algebraic Approach For Incremental Maintenance of Materialized XQuery Views Maged EL-Sayed, Ling Wang, Luping Ding, and Elke A.

Similar presentations


Presentation on theme: "11/08/2002WIDM20021 An Algebraic Approach For Incremental Maintenance of Materialized XQuery Views Maged EL-Sayed, Ling Wang, Luping Ding, and Elke A."— Presentation transcript:

1 11/08/2002WIDM20021 An Algebraic Approach For Incremental Maintenance of Materialized XQuery Views Maged EL-Sayed, Ling Wang, Luping Ding, and Elke A. Rundensteiner DSRG Lab, Computer Science Dept. Worcester Polytechnic Institute

2 11/08/2002WIDM20022 Materialized Views Why Views? Data warehouses Information Integration Information Inter-portability Why Materialized? Speeding up data retrieval Query optimization Focus on materialized views built using XQuery RDBXMLother Sources View Query

3 11/08/2002WIDM20023 Updating Materialized Views Updates to sources are common Views need to be maintained to be consistent with sources. How to update views: Re-computation Incremental update

4 11/08/2002WIDM20024 Related Work Relational Model: [GM95], [ZGMHW95], [AASY98], [ZR00], [KR02] Data updates, schema changes, relevant updates, algebraic-based propagation, concurrent updates, extended SQL, batch updates. XML model ARGOS [QCR01] : XQL, local cash indexes, relevant updates Semi-structured data [AMRVW98] : Lorel query language

5 11/08/2002WIDM20025 Goal Efficient update propagation for updates on XML views To handle different updates type : Element: insert, delete, and change Attribute: insert, delete, and change To handle any XML view defined by XQuery

6 11/08/2002WIDM20026 Our Approach: XPROP Uses XAT algebra [Rainbow] Uses update primitives to update XML Algebraic-rules for updates: For each algebraic update For each update primitive Propagate only relevant updates XML Source XML View Update Algebra Tree XQuery Definition

7 11/08/2002WIDM20027 Background: XML Algebra XAT Algebraic Operators: [Rainbow] XML Operators: ex. Navigate SQL Operators: ex. Select Special Operators: ex. Function XAT Data Model: [Rainbow] XAT table can hold: Atomic values Elements/attributes Collection of elements  $s2, entry $b S “reviews.xml” $s2 $b$s e1 r e2 r e3 r $s2 r

8 11/08/2002WIDM20028 Example Advanced Programming in the Unix environment Darcy Gerbarg Addison-Wesley Data on the Web Serge Abiteboul Morgan Kaufmann Publishers TCP/IP Illustrated W. Stevens Addison-Wesley Data on the Web A very good discussion of semi-structured database systems and XML Advanced Programming in the Unix environment A clear and detailed discussion of UNIX programming TCP/IP Illustrated One of the best books on TCP/IP reviews.xml bib.xml

9 11/08/2002WIDM20029 XQuery Example Retrieve book title for all books published by “Morgan Kaufmann Publishers” and their respective reviews FOR $a IN document("bib.xml")/book, $b IN document("reviews.xml")/entry WHERE $a/title = $b/title and $a/publisher = "Morgan Kaufmann Publishers" RETURN $a/title, $b/review Data on the Web A very good discussion of semi-structured database systems and XML View Definition Materialized View

10 11/08/2002WIDM200210 From XQuery to Algebra Tree S “bib.xml” $s1 S “reviews.xml” $s2  $s1, book $a  $s2, entry $b  $b, review $col12  $a, title $col11  $b, title $col5 J (($col11 == $col5) AND ($col7 == "Morgan Kaufmann Publishers")) $col1, $col12 T $col11$col12 $col13 Agg $col13  $a, publisher $col7 T $col13 $col14 Operators S : Source  : Navigate J : Join T : Tagger Agg: aggregate

11 11/08/2002WIDM200211 Sample XAT Execution  $s2, entry $b S “reviews.xml” $s2 $b e1 e2 e3  $b, review $col12 $col12$b r1 e1 r2 e2 r3 e3 $col5$ col12 t1 r1 t2 r2 t3 r3  $b, title $col5 $s2 r Data on the Web A very good discussion of semi-structured database systems and XML Advanced Programming in the Unix environment A clear and detailed discussion of UNIX programming TCP/IP Illustrated One of the best books on TCP/IP reviews.xml

12 11/08/2002WIDM200212 XPROP Update Primitives XML Update primitives (xmlup): applies to XML documents AddAtt(att, valu, pos) DeleteAtt(pos) ChangeAtt(valu, pos) AddEle(el, pos) DeleteEle(pos) ChangeEle(el, pos) XAT Update primitives (xatup): applies to XAT tables InsertTuple (tup, ord) DeleteTuple (id) ChangeTuple (xmlup, ucol, id)

13 11/08/2002WIDM200213 Update Propagation in XAT Table XAT Update Primitives: InsertTuple (tup, ord) DeleteTuple (id) ChangeTuple (xmlup, ucol, id) Example: ChangeTuple (DeleteEle(Author[2]:book), $col1, 2) $col1PID b1 11.. 12 pos Xmlup ucol id

14 11/08/2002WIDM200214 XPROP Update Primitives XML Source XML View Update XAT XQuery Definition XQuery xatup xmlup

15 11/08/2002WIDM200215 Update Propagation Example “Change publisher element of first book element to "Morgan Kaufmann Publishers" Advanced Programming in the Unix environment A clear and detailed discussion of UNIX programming Data on the Web A very good discussion of semi-structured database systems and XML ChangeEle( Morgan Kaufmann Publishers, book[1].publisher[1] : bib) Update to the source Effect on View bib.xmlreviews.xml XAT

16 11/08/2002WIDM200216  $s1, book $a  $s2, entry $b S “bib.xml” $s1 S “reviews.xml” $s2 $bPID e1 11 e2 12 e3 13 $aPID b1 11 b2 12 13  $b, review $col12  $a, title $col11 $col11$aPID t1 b1 11 t2 b2 22 t3 b3 33 $col12$bPID r1 e1 11 r2 e2 22 r3 e3 33  $b, title $col5  $a, publisher $col7 $s2ID r 1 $s1ID b 1 bib.xmlreviews.xml ChangeEle ( Morgan Kaufmann Publishers, book[1].publisher[1]:bib) 1 ChangeTuple(ChangeEle ( Morgan Kaufmann Publishers, book[1].publisher[1]:bib), $s1, 1) 2 ChangeTuple(ChangeEle ( Morgan Kaufmann Publishers,publisher[1]:book), $a, 1) 3 4 Update Propagation in XAT (I)

17 11/08/2002WIDM200217 $col7$ col11PID p1 t1 11 p2 t2 22 p3 t3 33 J (($col11 == $col5) AND $col7 == ("Morgan Kaufmann Publishers")) $col1, $col12 $col5$ col12PID t1 r1 11 t2 r2 22 t3 r3 33 $ col12$ col11PID r2 t1 {1 2}2 r1 t2 {2 1}1 T $col11$col12 $col13 $col13PID t1 r2 22 t2 r1 11 ChangeTuple( ChangeEle ( Morgan Kaufmann Publishers,publisher), $col7, 1) InsertTuple({2,{1, 2}, t1, t2 }, 1) InsertTuple({2,2, t1 r2 }, 1) 5 6 7  $b, title $col5  $a, publisher $col7 Agg $col13 Update Propagation in XAT (II)

18 11/08/2002WIDM200218 Agg $col13 $col13PID t2 r1 {2, 1}1 T $col13 $ col14 $col14PID t2 r1 11 ChangeTuple(AddtEle( t1 r2, 1), $col13, 1) t1 r2 t1 r2 ChangeTuple(AddtEle (.., 1: Result), $col14, 1) 8 9 Update Propagation in XAT (III) XML View AddtEle (.., 1: Result) 10

19 11/08/2002WIDM200219 System Architecture XML Source XML View XML Query Manager Propagation Rules Update Handle Update Maintainer. Intermediate Materialization XA T XPROP* RAINBOW System Module Storage Data Legend *Our system is built as an extension to the Rainbow system developed at WPI

20 11/08/2002WIDM200220 Experimental Result

21 11/08/2002WIDM200221 Summery One of the first algebraic incremental view maintenance approaches for XML Proposed a set of update primitive for updating XML documents Handle general updates on XML Proposed propagation rules to handle updates incrementally

22 11/08/2002WIDM200222 Future Work Use references in XAT tables Batch updates XAT tree rewrite Extensive Experiments

23 11/08/2002WIDM200223 Rainbow Project: http://davis.wpi.edu/dsrg/rainbow/index.html XPROP Extension: http://davis.wpi.edu/dsrg/xprop/index.html

24 11/08/2002WIDM200224 Extension to XAT Table We need extra information: Tuple ID (ID) Tuple parent ID (P) $col2$col1PID a1 b1 11 a2 b1 12 a3 b2 23  $cols, Author $col2 $col1PID b1 11 12  $s1, book $col1 S “bib.xml” $s1 $s1ID b 1 bib.xml

25 11/08/2002WIDM200225 Update Position Update Position (pos): [Niagara] Entry point part (EP) Relative for ward part (RF) Example: book[2].author[1] : bib EP can be: element name : ex. book[2].author[1] : bib XML fragment order: ex. author[2] : 1 Null: ex. Null : Null RF can be: set of elements/attributes with order: ex. book[2].author[1] : bib Null : ex. Null : Book

26 11/08/2002WIDM200226 Update Position and XAT $col1 … $col1 { … … } $col1 55 Element/attribute Collection Atomic Value Null : Null Author[1].last[1] : Book last[1] : 2 Data type in XATExample Update position


Download ppt "11/08/2002WIDM20021 An Algebraic Approach For Incremental Maintenance of Materialized XQuery Views Maged EL-Sayed, Ling Wang, Luping Ding, and Elke A."

Similar presentations


Ads by Google