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.
- F. Bancilhon, D. Maier, Y. Sagiv, J. D. Ullman. Magic sets and other strange ways to execute logic programs. In PODS 1986. Google ScholarDigital Library
- 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 ScholarDigital Library
- D. Chamberlin et al. A History and Evaluation of System R. Commun. ACM 24(10): 632--646(1981) Google ScholarDigital Library
- A. Chandra, P. Merlin, Optimal implementation of conjunctive queries in relational databases. 9th ACM Symposium on the Theory of Computing, 1997. Google ScholarDigital Library
- S. Cohen, Y. Kanza and Y. Sagiv. SQL4X: A Flexible Query Language for XML and Relational Databases. In DBPL 2001. Google ScholarDigital Library
- DB2 9 pureXML Guide. IBM redbooks, http://www.redbooks.ibm.com/.Google Scholar
- Derby, The apache DB Project (ver. 10.3). http://db.apache.org/derby/Google Scholar
- G. Gottlob and K. Schulz: Conjunctive queries over trees. In PODS 2004. Google ScholarDigital Library
- G. Hamilton, R. Cattell, M. Fisher, JDBC Database Access with Java. Addison-Wesley, 1997. Google ScholarDigital Library
- M. Harren, M. Raghavachari, O. Shmueli, M. Burke, R. Bordawekar, I. Pechtchanski, V. Sarkar, XJ: facilitating XML processing in Java. In WWW 2005. Google ScholarDigital Library
- Java architecture for XML binding. http://java.sun.com/xml/jaxb/.Google Scholar
- Jaxen -- The universal Java XPath engine (ver. 1.1.1). http://jaxen.org/.Google Scholar
- E. Meijer, B. Beckman, G. M. Bierman. LINQ: reconciling object, relations and XML in the .NET framework. In SIGMOD 2006. Google ScholarDigital Library
- Microsoft SQL Server. http://www.microsoft.com/sql/Google Scholar
- R. Murthy at. al. Towards an Enterprise XML architecture. In SIGMOD 2005. Google ScholarDigital Library
- R. Ronen and O. Shmueli. Conjunctive Queries over DAGs. In NGITS 2006. Google ScholarDigital Library
- R. Ronen and O. Shmueli. Evaluation of Datalog Extended with an XPath Predicate. In WIDM 2007 (in conj. with CIKM07). Google ScholarDigital Library
- SPARQL Query Language for RDF. http://www.w3.org/TR/rdf-sparql-query/Google Scholar
- SAXON, the XSLT and XQuery Processor. http://saxon.sourceforge.net/Google Scholar
- K. Beyer et. al. System RX: One Part Relational, One Part XML. In SIGMOD 2005. Google ScholarDigital Library
- International Organization for Standardization (ISO). I.T. DB Language SQL Part 14: XML-Related Specifications (SQL/XML).Google Scholar
- J. D. Ullman. Principles of Database and Knowledge Base Systems, Vol. I, II. C.S. Press, Rockville, Md, 1989. Google ScholarDigital Library
- W3C Document Object Model. 1997--2005. http://www.w3.org/DOM/.Google Scholar
- XMark, An XML Benchmark Project. 2003. http://www.xml-benchmark.org/.Google Scholar
- XPath 1999. http://www.w3.org/TR/xpath.Google Scholar
- XQuery 1.0. http://www.w3.org/TR/xquery.Google Scholar
- XSLT 1.0, 1999. http://www.w3.org/TR/xslt.Google Scholar
Index Terms
- Using a relational processor and an XPath processor to evaluate joint queries
Recommendations
Reformulating XPath queries and XSLT queries on XSLT views
Applications using XML for data representation very often use different XML formats and thus require the transformation of XML data. The common approach transforms entire XML documents from one format into another, e.g. by using an XSLT stylesheet. ...
Filtering unsatisfiable XPath queries
The satisfiability test checks, whether or not the evaluation of a query returns the empty set for any input document, and can be used in query optimization for avoiding the submission and the computation of unsatisfiable queries. Thus, applying the ...
Visual Evaluation of XPath Queries
ICCIS '13: Proceedings of the 2013 International Conference on Computational and Information SciencesOver the past one decade, due to its simplicity and flexibility, Extensible Markup Language (XML) is rapidly gaining in popularity as a universal data format for data exchange and integration on the web. In this paper, we present a novel framework to ...
Comments