80 likes | 201 Views
Composable XML Integration Grammars. Xibei Jia x.jia@sms.ed.ac.uk Laboratory for Foundations of Computer Science Supervisor: Wenfei Fan 20 May 2004. Schema-directed XML integration. XML view. schema. data exchange. middleware. XML3. XML1. XML2.
E N D
Composable XML Integration Grammars Xibei Jia x.jia@sms.ed.ac.uk Laboratory for Foundations of Computer Science Supervisor: Wenfei Fan 20 May 2004
Schema-directed XML integration XML view schema data exchange middleware XML3 XML1 XML2 • extract relevant data from distributed, multiple XML repositories • construct an XML view conform to a predefinedschema
www www www www www XIG middleware XIG middleware XIG middleware XIG middleware XIG middleware XML XML XML XML XML XML XML XML XML XML XML XML XML XML XML Composable XML Integration query result • A lightweight language: XML Integration Grammar (XIG)
optimizer parsing query scheduling query merging execution XQuery engine remote XIG call XQuery optimizer XML XML remote XIG XML data sources Our middleware for composable schema-directed integration XML document XIG cost statistics data result call
XIG: XML Integration Grammar • XIG: a novel specification language • Is not another query/transformation language • Rely solely on DTDs and XQuery • Provide a systematic mechanism and design tool to ensure DTD-conformance for XQuery • Can be defined using some specific XQuery fragment that allows for more optimizations than full-fledged XQuery • Composable: local/remote XIGs can be treated as functions returning XML trees and can be embedded A systematic framework for schema-directed XML integration
Example: car sale db dealers, promotion Syn(db) = <db> {Syn(dealers)} {Syn(promotion)} </db> promotion sale * Syn(promotion) = Vsale(X) dealers dealer * Inh(dealer) = for $Y in R/dl return $Y; Syn(dealers) = <dealers> { Syn(dealer) } </dealers> dealer name, address, cars Inh(name) = let $p := Inh(dealer)/Uv let $u := Inh(dealer)/U let $v = $p:Vdealer($u) return $v/dealer/name; Syn(dealer) = <dealer> { Syn(name) } { Syn(address) } { Syn(cars) } </dealer>
Example: car sale car car * Inh(car) let $s := Vsale(X) for $c in Inh(cars)/car $c1 in $s/promotion/sale where $c/make = $c1/make and $c/model = $c1/model return $c Syn(cars) = <cars> { Syn(car) } </cars> car make, model, price, inStock Syn(car) = Inh(car) name PCDATA /* similarly for address */ Syn(name) = Inh(name)/text();
XIG-Evaluation Algorithms • Optimization techniques: nontrivial optimization problems • recursion: capture recursive DTDs and recursive XIGs • query scheduling: a cost-based algorithm for scheduling local XML queries/XIGs and remote XIGs to maximize parallelism • query merging: merge certain queries processed at the same source into a larger query to reduce communication costs • interaction between query merging and query scheduling: have to be dealt with together, a greedy heuristic algorithm • query dependency: XIGs support top-down, bottom-up and sideway information passing (implicit)