skip to main content
10.1145/1416691.1416695acmotherconferencesArticle/Chapter ViewAbstractPublication PagesmobicaseConference Proceedingsconference-collections
research-article

Using a relational processor and an XPath processor to evaluate joint queries

Published:25 March 2008Publication History

ABSTRACT

Conjunctive queries (CQs) are a common abstraction for many query languages (or significant parts thereof) for relational data, XML data or both, such as SQL, XPath, XQuery, XSLT and SQL4X. This work considers the joint querying of relational and XML data by adding an XPath predicate to the CQ formalism. CQs are a basic building block of query processing understanding, and in that respect, adding an XPath predicate is a natural extension. Relational and XML data are "connected" either via references to XML nodes that are stored in relations (essentially oids, usually the result of previous queries) or via atomic text values. Then, relational and XML data are jointly referenced by allowing variables to be shared by relational and XPath predicates.

Our approach is that of co-processing of the query using an XPath processor and a relational data processor which operate separately, each on its type of data. The algorithms use known bindings to variables in the query in order to efficiently use the separate processors. We design and compare two such algorithms for evaluating CQs with XPath predicates. Column-Based On-Demand reduces the query evaluation problem to performing a join over ordinary relations. Quick On-Demand offers a controlled way to explore the evaluation space, using a heuristic procedure in the course of a step-wise evaluation of the query. Both algorithms avoid the need to use a sophisticated cost model as required by a standard evaluation procedure. We experimented with both algorithms on various size databases and query types. Each of the new algorithms performs best for different query types and both appear very promising. To calibrate, we transformed the queries to XQuery. Interestingly, the execution times are often favorable for our (not highly optimized) system.

References

  1. F. Bancilhon, D. Maier, Y. Sagiv, J. D. Ullman. Magic sets and other strange ways to execute logic programs. In PODS 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. F. Bry, T. Furche, B. Linse, A. Schroeder. Efficient Evaluation of n-ary Conjunctive Queries over Trees and Graphs. In WIDM 2006 (in conj. with CIKM06). Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. D. Chamberlin et al. A History and Evaluation of System R. Commun. ACM 24(10): 632--646(1981) Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. A. Chandra, P. Merlin, Optimal implementation of conjunctive queries in relational databases. 9th ACM Symposium on the Theory of Computing, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. S. Cohen, Y. Kanza and Y. Sagiv. SQL4X: A Flexible Query Language for XML and Relational Databases. In DBPL 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. DB2 9 pureXML Guide. IBM redbooks, http://www.redbooks.ibm.com/.Google ScholarGoogle Scholar
  7. Derby, The apache DB Project (ver. 10.3). http://db.apache.org/derby/Google ScholarGoogle Scholar
  8. G. Gottlob and K. Schulz: Conjunctive queries over trees. In PODS 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. G. Hamilton, R. Cattell, M. Fisher, JDBC Database Access with Java. Addison-Wesley, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Harren, M. Raghavachari, O. Shmueli, M. Burke, R. Bordawekar, I. Pechtchanski, V. Sarkar, XJ: facilitating XML processing in Java. In WWW 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Java architecture for XML binding. http://java.sun.com/xml/jaxb/.Google ScholarGoogle Scholar
  12. Jaxen -- The universal Java XPath engine (ver. 1.1.1). http://jaxen.org/.Google ScholarGoogle Scholar
  13. E. Meijer, B. Beckman, G. M. Bierman. LINQ: reconciling object, relations and XML in the .NET framework. In SIGMOD 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Microsoft SQL Server. http://www.microsoft.com/sql/Google ScholarGoogle Scholar
  15. R. Murthy at. al. Towards an Enterprise XML architecture. In SIGMOD 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. R. Ronen and O. Shmueli. Conjunctive Queries over DAGs. In NGITS 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. R. Ronen and O. Shmueli. Evaluation of Datalog Extended with an XPath Predicate. In WIDM 2007 (in conj. with CIKM07). Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. SPARQL Query Language for RDF. http://www.w3.org/TR/rdf-sparql-query/Google ScholarGoogle Scholar
  19. SAXON, the XSLT and XQuery Processor. http://saxon.sourceforge.net/Google ScholarGoogle Scholar
  20. K. Beyer et. al. System RX: One Part Relational, One Part XML. In SIGMOD 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. International Organization for Standardization (ISO). I.T. DB Language SQL Part 14: XML-Related Specifications (SQL/XML).Google ScholarGoogle Scholar
  22. J. D. Ullman. Principles of Database and Knowledge Base Systems, Vol. I, II. C.S. Press, Rockville, Md, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. W3C Document Object Model. 1997--2005. http://www.w3.org/DOM/.Google ScholarGoogle Scholar
  24. XMark, An XML Benchmark Project. 2003. http://www.xml-benchmark.org/.Google ScholarGoogle Scholar
  25. XPath 1999. http://www.w3.org/TR/xpath.Google ScholarGoogle Scholar
  26. XQuery 1.0. http://www.w3.org/TR/xquery.Google ScholarGoogle Scholar
  27. XSLT 1.0, 1999. http://www.w3.org/TR/xslt.Google ScholarGoogle Scholar

Index Terms

  1. Using a relational processor and an XPath processor to evaluate joint queries

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in
            • Published in

              cover image ACM Other conferences
              DataX '08: Proceedings of the 2008 EDBT workshop on Database technologies for handling XML information on the web
              March 2008
              76 pages
              ISBN:9781595939661
              DOI:10.1145/1416691

              Copyright © 2008 ACM

              Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 25 March 2008

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • research-article

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader