Abstract
Translating XPath into SQL queries is necessary if XML documents are stored in relational databases. Although most of the current methods can translate XPath into equivalent SQL queries, they seldom focus on the efficiency of the translated SQL queries. This paper proposes a method called X2S to handle the problem. X2S is based on the extended relational encoding, which can deal with the operators in XPath efficiently. X2S also exploits DTD to rewrite the XPath logically before the SQL translation. The goal of the rewriting is to eliminate the wildcards of the XPath, to remove the ancestor/descendant relationship and to shorten the length of the XPath. An estimation cost model is used to choose one with the lowest cost from the candidate SQL statements. The experimental results demonstrate that the SQL queries generated by X2S outperform those from other methods significantly.
Supported by the National High-Tech Research and Development Plan of China under Grant No.2002AA4Z3440; the National Grand Fundamental Research 973 Program of China under Grant No.G1999032705.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Dehaan, D., Toman, D., Consens, M.P., Tamer Ozsu, M.: A Comprehensive XQuery to SQL Translation Using Dynamic Interval Encoding. In: Proc. of SIGMOD, pp. 623–634 (2003)
Florescu, D., Kossman, D.: A Performance Evaluation of Alternative Mapping Schemes for Storing XML Data in a Relational Database. In: Rapport de Recherche No.3680 INRIA, Rocquencourt, France (May 1999)
Shanmugasundaram, J., Gang, H., Tufte, K., Zhang, C., Dewitt, D., Naughton, J.: Relational Database for Querying XML Documents: Limitation and Opportunities. In: Proc. of VLDB, pp. 302–314 (1999)
Grust, T., Keulen, M., Teubner, J.: Teach a relational DBMS to watch its step. In: Proc. of VLDB, pp. 524–535 (2003)
Krishnamurthy, R., Kaushik, R., Naughton, J., Chakaravarthy, V.: Recursive XML Schema, Recursive XML Queries and Relational Storage: XML-to-SQL Query translation. In: Proc. of ICDE (2004)
Krishnamurthy, R., Kaushik, R., Naughton, J.: XML-SQL Query Translation Literature: The State of the Art and Open Problems. In: Proc. of Xsym, pp. 1–18 (2003)
Krishnamurthy, R., Kaushik, R., Naughton, J.: Efficient XML-to-SQL Query Translation: Where to Add the Intelligence? In: Proc. of VLDB (2004)
Shanmugasundaram, J., Kiernan, J., Shekita, E., Fan, C., Funderburk, J.: Querying XML Views of Relational Data. In: Proc. of VLDB, pp. 261–270 (2001)
Clark, J.: XML Path language(XPath) (1999), Available from the W3C, http://www.w3.org/TR/XPath
World Wide Web Consortium. XSL Transformations (XSLT) version 1.0 (November 1999), http://www.w3.org/TR/XLST W3C Recommendation
World Wide Web Consortium. Xquery version 1.0 (January 2001) http://www.w3.org/TR/xquery , W3C working draft
XMark, www.xml-benchmark.org
Chan, C., Felber, P., Garofalakis, M., Rastogi, R.: Efficient Filtering of XML Document With XPath Expressions. In: Proc. of ICDE, pp. 235–244 (2002)
Miklau, G., Suciu, D.: Containment and Equivalence for an XPath Fragment. In: Proc.of PODS, pp. 65–76 (2002)
Neven, F., Schwentick, T.: XPath Containment in the Presence of Disjunction, DTDs, and Variables. In: Proc. of ICDT, pp. 315-329 (2003)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Gao, J., Yang, D., Liu, Y. (2004). X2S: Translating XPath into Efficient SQL Queries. In: Wang, S., et al. Conceptual Modeling for Advanced Application Domains. ER 2004. Lecture Notes in Computer Science, vol 3289. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30466-1_20
Download citation
DOI: https://doi.org/10.1007/978-3-540-30466-1_20
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-23722-8
Online ISBN: 978-3-540-30466-1
eBook Packages: Springer Book Archive