Presentation is loading. Please wait.

Presentation is loading. Please wait.

SilkRoute: A Framework for Publishing Relational Data in XML Mary Fernández, AT&T Labs - Research Dan Suciu, Univ. of Washington Yada Kadiyska, Univ. of.

Similar presentations


Presentation on theme: "SilkRoute: A Framework for Publishing Relational Data in XML Mary Fernández, AT&T Labs - Research Dan Suciu, Univ. of Washington Yada Kadiyska, Univ. of."— Presentation transcript:

1 SilkRoute: A Framework for Publishing Relational Data in XML Mary Fernández, AT&T Labs - Research Dan Suciu, Univ. of Washington Yada Kadiyska, Univ. of Washington Atsuyuki Morishima, Univ. of Tsukuba Wang-Chiew Tan, Univ. of Pennsylvania

2 2 XML-Relational Middleware XML: Standard, flexible syntax for exchanging data Lingua franca of B2B Applications Industry defines common XML vocabulary Document Type Descriptions (DTDs) or XML Schema Contract between data producers & consumers Reflects application domain XML-Relational Middleware Key business data in RDBMS Glue between existing business data & application Characteristics: General, dynamic, efficient SilkRoute : A Reference Framework

3 3 XML Data Management XML Documents & Schemas Legacy Database Persistent Database XML ConsumerXML Producer XML API or Query Publish XML Store XML XML Interfaces

4 4 Clothing Supplier & Reseller Shared XML Schema element supplier { element company, element product* } element company { xs:string } element product { element name, element category, element retail, element sale?, element reports* } element name { xs:string } element category { xs:string } element retail { attribute cur { xs:string }, xs:float } element sale { xs:float } ACME Clothing Suede jacket outerwear Rain boots outerwear leaks in heel heel separates

5 5 Viewing and Querying XML Most data in relational database Suppliers’ goal: Define XML view of data General: support many XML Schemas Efficient: leverage relational database Supplier Database ? = () ? Application Query Application Public Query ?

6 6 Viewing and Querying XML Supplier database ? ? = () ) ? ? = ° ? ? = Application Brokers’ goal: Uniform access Dynamic: Access up-to-date, minimal result (

7 7 SilkRoute Framework General, declarative view-definition language Public Query in XQuery Maps relational data to public XML view + Support many output XML Schemas Dynamic querying of XML views Application Query in XQuery Maps public XML data to application’s view Query composition algorithm + Underlying storage should be transparent to user + Access up-to-date, minimal result Efficient use of relational engine Query decomposition algorithm Selects query execution plan (one or more SQL queries) Uses relational engine’s cost estimates to guide search + Leverage power of relational query engine

8 8 Canonical XML View Clothing(pid, item, category, description, price, cost) : {, } Discount(pid, discount) : {, } 001 Suede jacket outerwear Hip length Rain boots outerwear Ankle height Oracle 9i XSQL Canonical XML View Use XSLT (out of engine) to transform canonical XML

9 9 Canonical & Public Views ACME Clothing Suede jacket outerwear Rain boots outerwear leaks in heel heel separates 001 Suede jacket outerwear Hip length Rain boots outerwear Ankle height

10 10 XQuery Strongly typed, functional XML query language Large-scale database access Must guarantee safety/correctness of operations on data Compositional: XML to XML Q 1 (Q 2 (D)) = (Q 1 o Q 2 )(D) XQuery 1.0 = XPath 2.0 (path, arithmetic, logical expressions) + f or-let-where-orderby-return (FLWOR) XML construction + User-defined (recursive) functions + Strong typing

11 11 for $c in $CanonicalView/Clothing/Tuple where $c/category = “outerwear” return { data($c/item) } { data($c/category) } { data($c/price) } Public View Query Public view query expressed in XQuery Includes all XQuery expressions Except recursive functions, features that depend on document order ? { for $d in $CanonicalView/Discount/Tuple where $d/pid = $c/pid return { $d/discount * $c/price } } ACME Clothing { } Type checking guarantees view conforms to public schema

12 12 for $s in $PublicView/supplier return { data($s/name) } { for $p in $s/product where $p/sale < 0.5 * $p/retail return { data($p/name) } } Application Query Application query expressed in XQuery Type checking guarantees application query correct w.r.t. public schema ?

13 13 SilkRoute Architecture Application View Forest Composer View Forest Decomposer XML Generator Internet/IntranetSilkRouteRelational Engine ? ? ???? All modules process view forests Representation of all views: canonical, public, application Maps relational data to XML document

14 14 Query Decomposition for $c in $CanonicalView/Clothing/Tuple where $c/category = “outerwear” return { data($c/item) } { data($c/category) } { data($c/price) } SELECT$c.pid as pid, $c.item as item, $c.category as category, $c.price as price FROM Clothing $c WHERE $c.category = “outerwear” View query may decompose into multiple SQL queries Use greedy algorithm (with help from RDBMS) to choose decomposition ? ? item category price

15 15 Related Systems Commercial Systems Oracle 9i – canonical mapping IBM DB2 XML Extender – annotated schema Microsoft SQL Server – universal relation, annotated schema (To date), none support full XQuery SQL Server supports XPath (Quasi) Research Systems Xperanto (IBM Almaden) – now a product Rolex, PRATA (Bell Labs)

16 16 Summary XML Publishing Systems Workhorses of B2B applications Key characteristics: General, dynamic, efficient Commercial Systems Oracle, IBM DB2, Microsoft SQL Server Some, but not all, of key characteristics SilkRoute : A Reference Framework General, declarative mappings from relations to XML Query composition & decomposition Establishes link between XQuery & SQL Prototype (re-)implementation (JDBC-compliant database)


Download ppt "SilkRoute: A Framework for Publishing Relational Data in XML Mary Fernández, AT&T Labs - Research Dan Suciu, Univ. of Washington Yada Kadiyska, Univ. of."

Similar presentations


Ads by Google