p337-fan - Query Translation from XPath to SQL in the...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Query Translation from XPath to SQL in the Presence of Recursive DTDs Wenfei Fan † * Jeffrey Xu Yu ‡ Hongjun Lu \ Jianhua Lu ‡ Rajeev Rastogi § † University of Edinburgh & Bell Laboratories, [email protected] ‡ The Chinese University of Hong Kong, Hong Kong, China, { yu,jhlu } @se.cuhk.edu.hk \ The Hong Kong University of Science and Technology, Hong Kong, China, [email protected] § Bell Laboratories (India), [email protected] Abstract The interaction between recursion in XPATH and recursion in DTDs makes it challenging to answer XPATH queries on XML data that is stored in an RDBMS via schema-based shredding. We present a new approach to translating XPATH queries into SQL queries with a simple least fixpoint (LFP) op- erator, which is already supported by most com- mercial RDBMS. The approach is based on our algorithm for rewriting XPATH queries into regu- lar XPATH expressions, which are capable of cap- turing both DTD recursion and XPATH queries in a uniform framework. Furthermore, we provide an algorithm for translating regular XPATH queries to SQL queries with LFP, and optimization tech- niques for minimizing the use of the LFP operator. The novelty of our approach consists in its capa- bility to answer a large class of XPATH queries by means of only low-end RDBMS features already available in most RDBMS. Our experimental re- sults verify the effectiveness of our techniques. 1 Introduction It is increasingly common to find XML data stored in a relational database system (RDBMS), typically based on DTD/schema-based shredding into relations [24] as found in many commercial products (e.g., [11, 19, 21]). With this comes the need for answering XML queries using RDBMS, by translating XML queries to SQL. The query translation problem can be stated as follows. Consider a mapping τ d , defined in terms of DTD-based shredding, from XML documents conforming to a DTD D to relations of a schema R . Given an XML query Q , we want * Supported in part by EPSRC GR/S63205/01, EPSRC GR/T27433/01 and NSFC 60228006. Permission to copy without fee all or part of this material is granted pro- vided that the copies are not made or distributed for direct commercial advantage, the VLDB copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Very Large Data Base Endowment. To copy otherwise, or to republish, requires a fee and/or special permission from the Endowment. Proceedings of the 31st VLDB Conference, Trondheim, Norway, 2005 to find (a sequence of) equivalent SQL queries Q such that for any XML document T conforming to D , Q on T can be answered by Q on the database τ d ( T ) of R that represents T ; that is, the set of nodes (ids) selected by Q on T equals the set of (unary) tuples (encoding T nodes) selected by Q on τ d ( T ) ; to simplify the exposition we denote this by Q ( T ) = Q ( τ d ( T )) in the sequel. We allow DTDs D to be recursive and consider queries...
View Full Document

This note was uploaded on 03/01/2010 for the course ICT ... taught by Professor ... during the Three '10 term at University of Sydney.

Page1 / 12

p337-fan - Query Translation from XPath to SQL in the...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online