190 likes | 332 Views
Maintaining XPath Views in Loosely Coupled Systems. Motivation. User Queries. Update. Our goal is an XML caching system for the WWW. Our focus is on keeping the cache up-to-date (i.e. maintaining the materialized views). Base Data ( BD ). Base Data. View Result. View Result.
E N D
Maintaining XPath Views in Loosely Coupled Systems VLDB 2006, Sept 14, Seoul, Korea
Motivation User Queries Update • Our goal is an XML caching system for the WWW. • Our focus is on keeping the cache up-to-date (i.e. maintaining the materialized views) Base Data (BD) Base Data View Result View Result View Maintenance
Incremental XML View Maintenance Incremental Maintenance of Path Expression Views. Arsany Sawires et al. SIGMOD 2005 Incremental Maintenance for Materialized XPath/XSLT Views.Makoto Onizuka et al.WWW 2005 Incremental Evaluation of a monotone XPath Fragment. Hidetaka Matsumura et al. CIKM 2005 Order-Sensitive View Maintenance of Materialized XQuery Views. Katica Dimitrova et al. ER 2003 And others …
The Goal of this Paper Update • All solutions so far assumed tight coupling. Good for same-system scenarios. • Our target WWW caching system requires a loosely coupled XPath view maintenance solution. Base Data View Result View Maintenance
The Rest of This Talk Model Conclusion END Tight Coupling Loose Coupling Approach Is it Really Effective? Outline
Data and Query Model View V BD Update U BD BD A1 A2 M1 A M B1 B2 A3 B A B C1 E1 C2 C B3 D1 D2 D D3 X1 Y1 X2 Y2 D2 C3 D1 X3 Z2 X2 Y2 X1 Y1 C Z2 View Result VR
Tight Coupling Assumptions Update Update Path: node idsand intermediate results Queries with node ids as context Base Data (BD) View Result (VR) Results includenode ids
Loose Coupling Assumptions View V Update U BD BD A M B A B C D D D X Y X Y Z C View Result VR
Overview on the Approach IRrelevance Test P IRT Ignore U N Self Maintainability Test P SMT Update VR N Re-compute VR InputU,V, VR
Updates and Their Effects Explicit Implicit • Base Updates: , Delete, or Modify Add • How could a base addition U affect VR ? Internal External
IRrelevance Test (IRT) A A A1 B B B1 E C C1 E1 D D T D1 D1 D2 D2 Y T1 Y2 T1 Y2 Y1 Y1 Res(V) = { D1 , D2 } ResD(U) = { D2 } Intersection ----(1) HOW ? Embedding -----(2) OK IF node on Spine(U), either (1) or (2) does not hold,Thenthe IRT is PositiveElse it is Negative.
Intensional XPath Intersection A A * D A B C B * C * A D E E M L N L Def.1∩2 iff a hypothetical BD s.t.Res(1) ∩Res(2) is not empty. 1∩2 Spine(1) ∩Spine(2) On the Intersection of XPath Expressions.Beda Hammerschmidt et al.IDEAS 2005
Self Maintainability Test (SMT) A A B A1 SME B E B1 C D C1 E1 D T D1 D2 Y D1 D2 T1 Y2 Y1 T1 Y2 Y1 • Write a correctSMExpression over VR. • Correct≡ No less and No more than U. • No lessOK • No more ? Res(V) Res(PrefD (U))
Intensional XPath Containment A A B B C E D D Homomorphism ? Def.12 iff hypothetical BD,Res(1) Res(2) Containment and Equivalence for a Fragment of XPath.Gerome Miklau and Dan Suciu.JACM 2004
A Quick Recap P Ignore U P Update VR Explicit Implicit Internal - XPath Intersection- XPath Embedding IRT N SMT - XPath Containment • Updates: Addition – Deletion – Modification
Experiments Rel. Saving = • No false positives perfect precision. • How about the recall (effect of false negatives)? XMARK (100MB) - XPath generator (YFilter)
Conclusion & Discussion • We have pointed out the need for loose coupling in XML View Maintenance. • We have taken a first-step in this direction using intensional XPath intersection and containment tests. • Looking Forward: • Extend the View and Update Language. • Exploit schema information, if available. • Handle order predicates, e.g. Book[2]. Thanks For Listening