From XQuery to relational logics

Author:

Benedikt Michael1,Koch Christoph2

Affiliation:

1. Oxford University

2. Cornell University

Abstract

Predicate logic has long been seen as a good foundation for querying relational data. This is embodied in the correspondence between relational calculus and first-order logic, and can also be seen in mappings from fragments of the standard relational query language SQL to extensions of first-order logic (e.g. with counting). A key question is what is the analog to this correspondence for querying tree-structured data, as seen, for example, in XML documents. We formalize this as the question of the appropriate logical query language for defining transformations on tree-structured data. The predominant practitioner paradigm for defining such transformations is top-down tree building . This is embodied by the XQuery query language, which builds the output tree in parallel starting at the root, based on variable bindings and nodeset queries in the XPath language. The goal of this article is to compare the expressiveness of top-down tree-building languages based on a benchmark of predicate logic. We start by giving a formalized XQuery XQ that can serve as a representative of the top-down approach. 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. We then consider fragments of atomic XQ . We identify a fragment that maps efficiently into first-order, a fragment that maps into existential first-order logic, and a fragment that maps into the navigationally two-variable fragment of first-order logic—an analog of two-variable logic in the setting where data values are unbounded. When XQ is considered with deep equality, we find that queries can be translated into FO with counting ( FO (Cnt)). Translations from XQ to logical languages on relations have a number of consequences. We use them to derive complexity bounds for XQ fragments, and to bound the Boolean expressiveness of XQ fragments.

Publisher

Association for Computing Machinery (ACM)

Subject

Information Systems

Reference35 articles.

1. Abiteboul S. Hull R. and Vianu V. 1995. Foundations of Databases. Addison-Wesley. Abiteboul S. Hull R. and Vianu V. 1995. Foundations of Databases. Addison-Wesley.

2. Eliminating definitions and Skolem functions in first-order logic

3. On uniformity within NC1

4. Benedikt M. 2008. Back From Relational Logics to XQuery. To appear. Benedikt M. 2008. Back From Relational Logics to XQuery. To appear.

5. Interpreting Tree-to-Tree Queries

Cited by 12 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Synthesizing nested relational queries from implicit specifications: via model theory and via proof theory;Logical Methods in Computer Science;2024-07-22

2. Generating collection transformations from proofs;Proceedings of the ACM on Programming Languages;2021-01-04

3. A Logic-Based Approach to Incremental Reasoning on Multi-agent Systems;Springer Proceedings in Mathematics & Statistics;2021

4. Incremental Verification and Coverage Analysis of Strongly Distributed Systems;Analytic Methods in Systems and Software Testing;2018-07-06

5. Maintenance of Queries Under Database Changes: A Unified Logic Based Approach;Lecture Notes in Computer Science;2016

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3