Abstract
We establish correspondences between top-down tree building query languages and predicate logics. We consider the expressive power of the query language XQ, a clean core of the practitioner’s language XQuery. We show that all queries in XQ with only atomic equality are equivalent to “first-order interpretations”, an analog to first-order logic (FO) in the setting of transformations of tree-structured data. When XQ is considered with deep equality, we find that queries can be translated into FO with counting (FO(Cnt)). We establish partial converses to this, characterizing the subset of the FO resp. FO(Cnt) interpretations that correspond to XQ. Finally, we study the expressive power of fragments of XQ and obtain partial characterizations in terms of existential FO and a fragment of FO that is two-variable if the tree node labeling alphabet is assumed fixed.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Ebbinghaus, H.-D., Flum, J.: Finite Model Theory, 2nd edn. Springer, Heidelberg (1999)
Etessami, K., Vardi, M., Wilke, T.: First Order Logic with Two Variables and Unary Temporal Logic. Information and Computation 179 (2002)
Gottlob, G., Koch, C., Pichler, R.: Efficient Algorithms for Processing XPath Queries. ACM Transactions on Database Systems 30(2), 444–491 (2005)
Immerman, N.: “Descriptive Complexity”. Springer, Heidelberg (1999)
Koch, C.: On the Complexity of Non-recursive XQuery and Functional Languages on Complex Values. In: Proc. PODS (2005)
Koch, C.: On the Role of Composition in XQuery. In: Proc. WebDB (2005)
Marx, M.: XPath with Conditional Axis Relations. In: Proc. EDBT (2004)
Marx, M.: First order paths in ordered trees. In: Proc. of the 10th International Conference on Database Theory (ICDT) (2005)
Paredaens, J., Van Gucht, D.: Possibilities and Limitations of Using Flat Operators in Nested Algebra Expressions. In: Proc. PODS, pp. 29–38 (1988)
Schweikardt, N.: Arithmetic, First-Order Logic, and Counting Quantifiers. ACM Transactions on Computational Logic 6(3), 634–671 (2005)
World Wide Web Consortium. “XQuery 1.0 and XPath 2.0 Formal Semantics”. W3C Working Draft (Aug.16th 2002), 2002 http://www.w3.org/TR/query-algebra/ .
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
Benedikt, M., Koch, C. (2006). Interpreting Tree-to-Tree Queries. In: Bugliesi, M., Preneel, B., Sassone, V., Wegener, I. (eds) Automata, Languages and Programming. ICALP 2006. Lecture Notes in Computer Science, vol 4052. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11787006_47
Download citation
DOI: https://doi.org/10.1007/11787006_47
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-35907-4
Online ISBN: 978-3-540-35908-1
eBook Packages: Computer ScienceComputer Science (R0)