Download presentation
Presentation is loading. Please wait.
Published byHoratio Marshall Modified over 9 years ago
1
Navigation-Driven Evaluation of Virtual Mediated Views Bertram Ludäscher, SDSC/UCSD Yannis Papakonstantinou, UCSD Pavel Velikhov, UCSD Overview Mediator architecture for virtual XML documents Navigation-driven evaluation: lazy mediators XMAS QL and algebra Mismatch: DOM-VXD vs. source granularity Conclusions
2
Mediator Architecture for Virtual XML Documents (DOM-VXD) Client Query Integrated XML View Data Source XML Data Source Data Source XML View Wrapper XML View XML View MIXm Mediator MIXm Mediator XMAS View Definition
3
Mediator Architecture for Virtual XML Documents (DOM-VXD) Client Query Integrated Virtual XML View Data Source XML Data Source Data Source Virtual XML View Wrapper Virtual XML View Virtual XML View MIXm Mediator MIXm Mediator XMAS View Definition
4
Navigating Virtual Views Mediator approaches: warehousing virtual compute complete answer compute partial answer “on demand”, i.e., driven by the client navigations answer book author Ullman title DB Systems dblp-pubs publication... publication dblp … author name Ullman pubs publication … publication db-books@amazon book author Ullman title DB Systems book author …
5
... s1 sn XML source result Lazy Mediator view definition ans = q( s1 … sn ) Input: client navigations Output: source navigations Navigation-Driven Evaluation: Lazy Mediators
6
... s1 sn XML source result Lazy Mediator view definition ans = q( s1 … sn ) Input: client navigations Output: source navigations Navigation-Driven Evaluation: Lazy Mediators
7
... s1 sn XML source result Lazy Mediator view definition ans = q( s1 … sn ) Input: client navigations Output: source navigations Navigation-Driven Evaluation: Lazy Mediators
8
... s1 sn XML source result Lazy Mediator view definition ans = q( s1 … sn ) Input: client navigations Output: source navigations Navigation-Driven Evaluation: Lazy Mediators
9
... s1 sn XML source result Lazy Mediator view definition ans = q( s1 … sn ) Input: client navigations Output: source navigations
10
Modeling Navigations Navigational commands (subset of DOM API): d (down) r (right) f (fetch) d d f r d d Navigations: c 1 (p 0 ), c 2 (p 1 ), …, c n (p n-1 ) (p j = c i (p i-1 ), i < j) p1p1 p0p0 p4p4 rr
11
Query Processing Translator Rewriter/Optimizer Composed Algebraic Plan Optimized Plan XMAS Query Composition (q o v) Algebraic Plan for the Query XMAS View Definition Algebraic Plan for the View Plan Execution Compile-time Run-time: lazy VXD evaluation Run-time: lazy VXD evaluation
12
XMAS Queries (XML Matching And Structuring Language) CONSTRUCT $a1 $t $p { $p } { $a1, $t } WHERE $a1 : $t : IN "amazon.com" AND $a2 : $p : IN "www...DBLP… " AND value( $a1 ) = value( $a2 ) CONSTRUCT $a1 $t $p { $p } { $a1, $t } WHERE $a1 : $t : IN "amazon.com" AND $a2 : $p : IN "www...DBLP… " AND value( $a1 ) = value( $a2 )
13
XMAS Algebra val($a1)=val($a2) Concat [$a1, $t,$eps]-> $list getD $book,”title”->$t getD $book,”author”->$a1 getD amazon,”books.book”->$book getD $auth,”pubs.pub”->$p getD $auth,”name”->$a2 getD DBLP,”authors.author”->$auth createElement ”book”, $list -> $Res removeDuplicates [$a1, $t] groupBy [$a1,$t],$p->$ps createElement “pubs”,$ps->$eps
14
XMAS Algebra relational operators + XML specific ones ( nest, unnest + pe’s) works on trees of variable bindings createElement name,ch->e createList name,ch->e concatenate [l1…lk]->z groupBy [a1…gk],v->l getDescendents e,pe->ch getName e->name assign f[u1…un],[v1…vn]->x map f[u1…un],[v1…vn]->[x1…xn] … createElement name,ch->e createList name,ch->e concatenate [l1…lk]->z groupBy [a1…gk],v->l getDescendents e,pe->ch getName e->name assign f[u1…un],[v1…vn]->x map f[u1…un],[v1…vn]->[x1…xn] …
15
Lazy Mediator Example BOOKS $A1 $T Peter XML for smarties Mary All about XML … DBLP $A2 $P Peter … Mary … … answer book author Peter XML for … pubs Value($A1)=Value($A2) … book author … Mary All about … pubs
16
Efficiency of Lazy Mediators Natural measure: client vs. source navigations Bounded Browsable: bounded # of source navigations Browsable: does not require accessing all elements of lists Unbrowsable: may require accessing all elements of lists (depend on the given navigation commands!) Complexity XMAS Operators Bounded Browsable Unbrowsable createElement, getName, concat, getDescendents, groupBy, , , setdiff, orderBy Navigational Complexity:
17
Optimizing Using Navigational Complexity materialize Browsable Unbrowsable Potential for optimization of unbrowsable sub-parts:
18
Granularity of Navigations Mismatch: Source granularity DOM-VXD granularity (RDB: sets of tuples vs. individual table cells) => source should control result granularity => generic buffer component (above the wrapper) based on LXP (Lean XML Fragment Protocol)
19
LXP Protocol getRoot get a holeId (“handle”) for the root node fillHole( holeId ) replaces the hole in the open XML tree with a list of nodes and possibly further holes getRoot get a holeId (“handle”) for the root node fillHole( holeId ) replaces the hole in the open XML tree with a list of nodes and possibly further holes Buffer requests: Holes open XML tree
20
Some Empirical Results: Selection Queries 2400 homes SelectivityFirst TenAllConditions 1.031ms3.3s--- 0.8531ms4.7s garage 0.6663ms7.1s>2 beds and no pool 0.4516ms2s>3 beds 0.378ms2.7s>3 beds and no pool 0.2231ms1.7s pool 0.162ms1.6s>4 beds 0.01703ms1.5s>5 beds
21
Performance Evaluation: Construction Queries SelectivityFirst TenAllConditions 1.01.2s12s--- 0.731.9s10s garage 0.661.6s9.9s>2 beds and no pool 0.3416ms5s>3 beds 0.2415ms2.5s pool 0.0931ms2.5s>3 beds and pool 328 homes x 122 schools
22
Summary & Conclusions Demand-driven evaluation of virtual XML views related to relational iterators and pipelines (but: trees vs tables, multiple vs single continuations…) XMAS QL and algebra for XML (try some “XMAS-BBQ”: demo #14) http://www.npaci.edu/DICE/MIX/ http://www.db.ucsd.edu/Projects/MIX/ Future work XMAS and DOM-VXD extensions Optimizing wrt. navigational complexity Better (quantitative) cost model
23
Current MIX People Chaitan Baru, SDSC Amarnath Gupta, SDSC/UCSD Bertram Ludaescher, SDSC/UCSD Richard Marciano, SDSC Pratik Mukhopadhyay, UCSD Kevin Munroe, UCSD Yannis Papakonstantinou, UCSD Pavel Velikhov, UCSD Victor Vianu, UCSD Andreas Yannakopoulos, UCSD Ilya Zaslavsky, SDSC
24
Translating result NCs into source NCs root tuple t1t1 t name t ch tntn... root tuple t1t1 t name t ch tntn... tete c1c1 cmcm c1c1 cmcm c1c1 cmcm root tuple t0tnte identity... f/d(tuple)r name f d/d(tuple)r ch d
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.