maintaining xpath views in loosely coupled systems
DESCRIPTION
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. - PowerPoint PPT PresentationTRANSCRIPT
VLDB 2006, Sept 14, Seoul, Korea
Arsany Sawires UC Santa Barbara
Junichi Tatemura NEC Labs
Oliver Po NEC Labs
Divyakant Agrawal NEC Labs
Amr El Abbadi UC Santa Barbara
K. Selcuk Candan NEC Labs
Maintaining XPath Views in Loosely Coupled Systems
View Result
View Maintenance
Base Data(BD)
Motivation
• 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 DataView Result
Update
User Queries
Incremental XML View MaintenanceIncremental 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 …
View Maintenance
The Goal of this Paper
• 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 DataView Result
Update
The Rest of This Talk
Model
Is it Really Effective?
Conclusion
END
Tight Coupling
Loose Coupling Approach
Outline
A1
B1
C
1
E1
D
1X1 Y1
M1
BD
A2
B2
C2
D
2X2 Y2
Z2
A3
B3
D
3X3
Data and Query Model
D
1X1 Y1
D
2X2 Y2
Z2
C
C3
Update U
M
BD
AB
View V
A
BD
B
CD
View Result VR
Tight Coupling Assumptions
Update Path: node idsand intermediate results
Base Data(BD)
View Result(VR)
Results includenode ids
UpdateQueries with node ids as context
Loose Coupling Assumptions
C
View V
A
BD
B
CD
Update U
M
BD
AB
View Result VR
D
X Y
D
X Y
Z
Overview on the Approach
Input U, V, VR
Update VRP
N
SMTSelf Maintainability Test
Re-compute VR
N
Ignore U P IRTIRrelevance Test
Updates and Their Effects
Add
• How could a base addition U affect VR ?
• Base Updates: , Delete, or Modify
Internal External
Explicit Implicit
D
2
A1
B1
C
1
E1
Y2
D
1Y1
T1
A
B
E
D
TY
IRrelevance Test (IRT)
A
B
C
D
Res(V) = { D1 , D2 }
ResD(U) = { D2 }
Intersection ----(1)
Embedding -----(2)
IF node on Spine(U), either (1) or (2) does not hold,Then the IRT is PositiveElse it is Negative.
D
1Y1
D
2Y2T1
HOW ?
OK
Intensional XPath IntersectionDef. 1 ∩ 2 iff a hypothetical BD s.t.
Res(1) ∩ Res(2) is not empty.
Spine(1) ∩ Spine(2)
L
A
B
C
A
D
*E
N
L
1 ∩ 2
A B C*
*A D E
M
On the Intersection of XPath Expressions.Beda Hammerschmidt et al. IDEAS 2005
Self Maintainability Test (SMT)• Write a correct SM Expression over VR.
• Correct ≡ No less and No more than U.
• No less OK
• No more ?E1
D
2
A1
B1
C
1
Y2
D
1Y1
T1
A
B
C
D D
1Y1
D
2Y2T1
A
B
E
D
TY
SME
Res(V) Res(PrefD (U))
Intensional XPath Containment
A
B
C
D
A
B
E
D
Def. 1 2 iff hypothetical BD,
Res(1) Res(2)
Homomorphism ?
Containment and Equivalence for a Fragment of XPath.Gerome Miklau and Dan Suciu. JACM 2004
A Quick Recap
Update VRP
N
SMT - XPath Containment
Ignore U P IRT- XPath Intersection- XPath Embedding
• Updates: Addition – Deletion – Modification
Internal Explicit Implicit
Experiments
XMARK (100MB) - XPath generator (YFilter)
ivesFalseNegatPositives
Positives
Rel. Saving =
• No false positives perfect precision.
• How about the recall (effect of false negatives)?
Exp.1: Varying the Number of Views
0
0.2
0.4
0.6
0.8
1
1.2
10 20 30 40 50 60 70 80 90 100
Number of views
Rel
. sa
ving
Base Additions
Base Deletions
Exp.2: Varying Parameters of U
0
0.2
0.4
0.6
0.8
1
1.2
0 0.2 0.4 0.6 0.8 1
Probability of "//"
Rel
. sa
ving
Base AdditionsBase Deletions
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