Abstract
XML-based databases have become a major area of interest in database research. Abstractly speaking they can be considered as a resurrection of complex-value databases using constructors for records, lists, unions plus optionality and references. XQuery has become the standard query language for XML. As XQuery is a declarative query language, the problem of query optimisation arises. In this paper an algebraic approach to query optimisation is introduced. This is based on a translation of XQuery into a query algebra for rational tree types. The algebra uses simple operations on types and structural recursion for lists. The translation exploits linguistic reflection for the type-safe expansion of path expressions. The availability of an algebraic representation of queries permits query rewriting, which in combination with cost heuristics permits queries to be rewritten and thus optimised.
The work reported in this paper was supported by FRST/NERF grant MAUX0025 “DIMO – Distributed Multi-Level Object Bases”.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Abiteboul, S., Buneman, P., Suciu, D.: Data on the Web: From Relations to Semistructured Data and XML. Morgan Kaufmann Publishers, San Francisco (2000)
Abiteboul, S., Hull, R., Vianu, V.: Foundations of Databases. Addison-Wesley, Reading (1995)
Abiteboul, S., Kanellakis, P.C.: Object identity as a query language primitive. In: Bancilhon, F., Delobel, C., Kanellakis, P.C. (eds.) Building an Object-Oriented Database System, The Story of O2, pp. 97–127. Morgan Kaufmann, San Francisco (1992)
Abiteboul, S., Quass, D., McHugh, J., Widom, J., Wiener, J.: The LOREL query language for semi-structured data. International Journal on Digital Libraries 1(1), 68–88 (1997)
Beeri, C., Ta-Shma, P.: Bulk data types, a theoretical approach. In: Database Programming Languages (DBPL-4). Workshops in Computing, pp. 80–96. Springer, Heidelberg (1993)
Buneman, P., Davidson, S., Hillebrand, G., Suciu, D.: A query language and optimization techniques for unstructured data. In: Proceedings of the International Conference on Management of Data, pp. 505–516. ACM Press, New York (1996)
Chen, Y., Davidson, S.B., Zheng, Y.: BLAS: An efficient XPath processing system. In: Weikum, G., König, A.C., Deßloch, S. (eds.) Proceedings of the Symposium on Principles of Database Systems, pp. 47–58. ACM Press, New York (2004)
Cluet, S., Delobel, C., Lécluse, C., Richard, P.: RELOOP: An algebra-based query language for O2. In: Bancilhon, F., Delobel, C., Kanellakis, P. (eds.) Building an Object-Oriented Database System – The Story of O2. Morgan Kaufmann, San Francisco (1992)
Cluet, S., Moerkotte, G.: Nested queries in object bases. In: Beeri, C., Ohori, A., Shasha, D. (eds.) Database Programming Languages (DBPL-4). Workshops in Computing, pp. 226–242. Springer, Heidelberg (1993)
Courcelle, B.: Fundamental properties of infinite trees. Theoretical Computer Science 25, 95–169 (1983)
DeHaan, D., Toman, D., Consens, M.P., Özsu, M.T.: A comprehensive XQuery to SQL translation using dynamic interval encoding. In: Halevy, A.Y., Ives, Z.G., Doan, A. (eds.) Proceedings of the Symposium on Principles of Database Systems, pp. 623–634. ACM Press, New York (2003)
Deutsch, A., Fernandez, M., Florescu, D., Levy, A., Suciu, D.: A query language for XML. Computer Networks 31, 11–16, 1155–1169 (1999)
Fernandez, M.F., Siméon, J., Wadler, P.: An algebra for XML query. In: Proceedings of the 20th Conference on Foundations of Software Technology and Theoretical Computer Science, pp. 11–45. Springer, Heidelberg (2000)
Gottlob, G., Koch, C., Pichler, R.: The complexity XPath query evaluation. In: Proceedings of the 22nd Symposium on Principles of Database Systems, pp. 179–190. ACM Press, New York (2003)
Jagadish, H.V., Lakshmanan, L.V.S., Srivastava, D., Thompson, K.: TAX: A tree algebra for XML. In: Revised Papers from the 8th International Workshop on Database Programming Languages, pp. 149–164. Springer, Heidelberg (2002)
Katz, H. (ed.): XQuery from the Experts – A Guide to the W3C XML Query Language. Addison-Wesley, Reading (2003)
Kemper, A., Moerkotte, G.: Query optimization in object bases: Exploiting relational techniques. In: Freytag, J.-C., Maier, D., Vossen, G. (eds.) Proceedings of the Dagstuhl Workshop on Query Optimization. Morgan Kaufmann, San Francisco (1993)
Kirby, G.N.C., Connor, R.C.H., Morrison, R.: START: A linguistic reflection tool using hyper-program technology. In: Atkinson, M.P., Maier, D., Benzaken, V. (eds.) Proceedings of the Sixth International Workshop on Persistent Object Systems. Workshops in Computing, pp. 355–373. Springer, Heidelberg (1994)
Kirchberg, M., Ma, H., ud Din, F.R., Schewe, K.-D.: A unified approach to object algebras. unpublished, available from the authors (2003)
Kirchberg, M., Riaz-ud-Din, F., Schewe, K.-D., Tretiakov, A.: Using reflection for querying XML documents. In: Bailey, J., Dobbie, G. (eds.) Database Technologies 2006. Proceedings of the 17th Australasian Database Conference (ADC). CRPIT, vol. 49, pp. 119–128. Australian Computer Society (2006)
Kirchberg, M., Schewe, K.-D., Tretiakov, A.: A multi-level architecture for distributed object bases. In: Camp, O., Filipe, J., Hammoudi, S., Piattini, M. (eds.) Proceedings of the 5th International Conference on Enterprise Information Systems (ICEIS), vol. 1, pp. 63–70. ICEIS Press (2003)
Kirchberg, M., Schewe, K.-D., Tretiakov, A.: Using XML to support media types. In: Kaschek, R., Mayr, H.C., Liddle, S.W. (eds.) 4th International Conference on Information Systems Technology and its Applications, GI. LNI, vol. 63, pp. 101–113 (2005)
Koch, C.: On the complexity of nonrecursive XQuery and functional query languages on complex values. In: Principles of Database Systems. ACM Press, New York (2005)
Leung, T.W., Mitchell, G., Subramanian, B., Vance, B., Vandenberg, S.L., Zdonik, S.B.: The AQUA data model and algebra. In: Beeri, C., Ohori, A., Shasha, D. (eds.) Database Programming Languages (DBPL-4). Workshops in Computing, pp. 157–175. Springer, Heidelberg (1993)
Libkin, L., Wong, L.: New techniques for studying set languages, bag languages and aggregate functions. In: Principles of Database Systems (PODS), pp. 155–166. ACM Press, New York (1994)
Lobin, H.: Informationsmodellierung in XML und SGML. Springer, Heidelberg (2001)
Marx, M.: Conditional XPath, the first order complete XPath dialect. In: Proceedings of the 23rd Symposium on Principles of Database Systems (PoDS), pp. 13–22. ACM Press, New York (2004)
Paparizos, S., Wu, Y., Lakshmanan, L.V.S., Jagadish, H.V.: Tree logical classes for efficient evaluation of XQuery. In: Weikum, G., König, A.C., Deßloch, S. (eds.) Proceedings of the Symposium on Principles of Database Systems (SIGMOD), pp. 71–82. ACM, New York (2004)
Savnik, I., Tari, Z., Mohoric, T.: QAL: A query algebra of complex objects. Data and Knowledge Engineering 30(1), 57–94 (1999)
Schewe, K.-D.: On the unification of query algebras and their extension to rational tree structures. In: Orlowska, M.E., Roddick, J.F. (eds.) Database Technologies – Proceedings of the 12th Australasian Database Conference (ADC), pp. 52–59. IEEE Computer Society, Los Alamitos (2001)
Schewe, K.-D., Schmidt, J.W., Wetzel, I.: Identification, genericity and consistency in object-oriented databases. In: Hull, R., Biskup, J. (eds.) ICDT 1992. LNCS, vol. 646, pp. 341–356. Springer, Heidelberg (1992)
Schewe, K.-D., Thalheim, B.: Fundamental concepts of object oriented databases. Acta Cybernetica 11(4), 49–84 (1993)
Shaw, G.M., Zdonik, S.B.: An object-oriented query algebra. In: Hull, R., Morrison, R., Stemple, D.W. (eds.) Proceedings of the Second International Workshop on Database Programming Languages, pp. 103–112. Morgan Kaufmann, San Francisco (1989)
Sheard, T., Fegaras, L.: A fold for all seasons. In: Conference on Functional Programming Languages and Computer Architecture, pp. 233–242. ACM Press, New York (1993)
Sheard, T., Stemple, D.W.: Automatic verification of database transaction safety. ACM Transactions on Database Systems 14(3), 322–368 (1989)
Siméon, J., Wadler, P.: The essence of XML. In: Proceedings of the 30th Symposium on Principles of Programming Languages (POPL). ACM Press, New York (2003)
Stemple, D.W., Fegaras, L., Sheard, T., Socorro, A.: Exceeding the limits of polymorphism in database programming languages. In: Bancilhon, F., Tsichritzis, D.C., Thanos, C. (eds.) EDBT 1990. LNCS, vol. 416, pp. 269–285. Springer, Heidelberg (1990)
Stemple, D.W., Morrison, R., Atkinson, M.P.: Type-safe linguistic reflection. In: Kanellakis, P.C., Schmidt, J.W. (eds.) Database Programming Languages: Bulk Types and Persistent Data, pp. 357–360. Morgan Kaufmann, San Francisco (1991)
Stemple, D.W., Sheard, T.: A recursive base for database programming primitives. In: Stogny, A.A., Schmidt, J.W. (eds.) EWDW 1990. LNCS, vol. 504, pp. 311–332. Springer, Heidelberg (1991)
Suciu, D., Wong, L.: On two forms of structural recursion. In: Vardi, M.Y., Gottlob, G. (eds.) ICDT 1995. LNCS, vol. 893, pp. 111–124. Springer, Heidelberg (1995)
Tannen, V., Buneman, P., Wong, L.: Naturally embedded query languages. In: Hull, R., Biskup, J. (eds.) ICDT 1992. LNCS, vol. 646, pp. 140–154. Springer, Heidelberg (1992)
Tatarinov, I., Ives, Z., Halevy, A., Weld, D.: Updating XML. In: Proceedings of the International Conference on Management of Data, pp. 413–424. ACM, New York (2001)
Thalheim, B.: Entity-Relationship Modeling: Foundations of Database Technology. Springer, Heidelberg (2000)
Wadler, P.: Comprehending monads. Mathematical Structures in Computer Science 2(4), 461–493 (1992)
Wong, L.: Normal forms and conservative properties for query languages over collection types. In: Principles of Database Systems (PODS), pp. 26–36. ACM Press, New York (1993)
World Wide Web Consortium (W3C). XML Schema (2001) http://www.w3c.org/TR/xmlschema-0 , http://www.w3c.org/TR/xmlschema-1 , http://www.w3c.org/TR/xmlschema-2
World Wide Web Consortium (W3C). XQuery (2004), http://www.w3c.org/TR/xquery
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Kirchberg, M., Riaz-ud-Din, F., Schewe, KD., Tretiakov, A. (2006). Towards Algebraic Query Optimisation for XQuery. In: Spaccapietra, S. (eds) Journal on Data Semantics VII. Lecture Notes in Computer Science, vol 4244. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11890591_6
Download citation
DOI: https://doi.org/10.1007/11890591_6
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-46329-0
Online ISBN: 978-3-540-46330-6
eBook Packages: Computer ScienceComputer Science (R0)