Scalable XQuery type matching

XML Schema awareness has been an integral part of the XQuery language since its early design stages. Matching XML data against XML types is the main operation that backs up XQuery type expressions, such as typeswitch, instance of, or certain XPath operators. This interaction is particularly vital in data-centric XQuery applications, where data come with detailed type information from an XML Schema document. So far there has been little work on the optimization of those operations. This work presents an efficient implementation of the runtime aspects of XML Schema support. We propose type ranks as a novel and uniform way to implement all facets of type matching in the W3C XQuery Recommendation. As a concise encoding of the type hierarchy defined by an XML Schema document, type ranks minimize the cost of checking the runtime type of XQuery singleton items. By aggregating type ranks, we leverage the grouping capabilities of modern DBMS implementations to efficiently execute type matching on XQuery sequences. In addition, we improve the complexity bounds incurring with typeswitch expressions over existing approaches. Experiments on an off-the-shelf database system demonstrate the potential of our approach.

[1]  Sven Helmer,et al.  Full-fledged algebraic XPath processing in Natix , 2005, 21st International Conference on Data Engineering (ICDE'05).

[2]  Yves Caseau Efficient handling of multiple inheritance hierarchies , 1993, OOPSLA '93.

[3]  Bowen Alpern,et al.  Dynamic Type Checking in Jalapeño , 2001, Java Virtual Machine Research and Technology Symposium.

[4]  Christopher Ré,et al.  A Complete and Efficient Algebraic Compiler for XQuery , 2006, 22nd International Conference on Data Engineering (ICDE'06).

[5]  Philip Wadler,et al.  The essence of XML , 2003, POPL '03.

[6]  Sherif Sakr,et al.  XQuery on SQL Hosts , 2004, VLDB.

[7]  Torsten Grust,et al.  Why off-the-shelf RDBMSs are better at XPath than you might expect , 2007, SIGMOD '07.

[8]  Volker Linnemann,et al.  Type Checking in XOBE , 2003, BTW.

[9]  Norman H. Cohen Type-extension type test can be performed in constant time , 1991, TOPL.

[10]  Scott Boag,et al.  XQuery 1.0 : An XML Query Language , 2007 .

[11]  Lenhart K. Schubert,et al.  Determining Type, Part, Color, and Time Relationships , 1983, Computer.

[12]  Torsten Grust,et al.  Schema Validation and Type Annotation for Encoded Trees , 2004, XIME-P.

[13]  Torsten. Grust,et al.  Accelerating XPath location steps , 2002, SIGMOD '02.

[14]  Benjamin C. Pierce,et al.  Regular expression types for XML , 2000, TOPL.