Transcript Slide 1

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