Skip to main content

X2S: Translating XPath into Efficient SQL Queries

  • Conference paper
Conceptual Modeling for Advanced Application Domains (ER 2004)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3289))

Included in the following conference series:

  • 692 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)

    Google Scholar 

  2. 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)

    Google Scholar 

  3. 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)

    Google Scholar 

  4. Grust, T., Keulen, M., Teubner, J.: Teach a relational DBMS to watch its step. In: Proc. of VLDB, pp. 524–535 (2003)

    Google Scholar 

  5. 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)

    Google Scholar 

  6. 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)

    Google Scholar 

  7. Krishnamurthy, R., Kaushik, R., Naughton, J.: Efficient XML-to-SQL Query Translation: Where to Add the Intelligence? In: Proc. of VLDB (2004)

    Google Scholar 

  8. Shanmugasundaram, J., Kiernan, J., Shekita, E., Fan, C., Funderburk, J.: Querying XML Views of Relational Data. In: Proc. of VLDB, pp. 261–270 (2001)

    Google Scholar 

  9. Clark, J.: XML Path language(XPath) (1999), Available from the W3C, http://www.w3.org/TR/XPath

  10. World Wide Web Consortium. XSL Transformations (XSLT) version 1.0 (November 1999), http://www.w3.org/TR/XLST W3C Recommendation

  11. World Wide Web Consortium. Xquery version 1.0 (January 2001) http://www.w3.org/TR/xquery , W3C working draft

  12. XMark, www.xml-benchmark.org

  13. Chan, C., Felber, P., Garofalakis, M., Rastogi, R.: Efficient Filtering of XML Document With XPath Expressions. In: Proc. of ICDE, pp. 235–244 (2002)

    Google Scholar 

  14. Miklau, G., Suciu, D.: Containment and Equivalence for an XPath Fragment. In: Proc.of PODS, pp. 65–76 (2002)

    Google Scholar 

  15. SAX, http://xml.apache.org

  16. Neven, F., Schwentick, T.: XPath Containment in the Presence of Disjunction, DTDs, and Variables. In: Proc. of ICDT, pp. 315-329 (2003)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics