Skip to main content
QUICK REVIEW

[论文解读] XTQ: A Declarative Functional XML Query Language

Xuhui Li, Mengchi Liu|arXiv (Cornell University)|Jun 4, 2014
Advanced Database Systems and Queries参考文献 25被引用 5
一句话总结

XTQ 是一种声明式、基于模式的函数式 XML 查询语言,通过匹配项和归纳重构机制,支持对分层且异构的 XML 数据进行表达性强、连贯的查询。它支持声明式数据提取、过滤和复杂嵌套结构的转换,提供了一个统一框架,在处理 XML 查询中的析取关系和分层关系方面超越了现有语言。

ABSTRACT

Various query languages have been proposed to extract and restructure information in XML documents. These languages, usually claiming to be declarative, mainly consider the conjunctive relationships among data elements. In order to present the operations where the hierarchical and the disjunctive relationships need to be considered, such as restructuring hierarchy and handling heterogeneity, the programs in these languages often exhibit a procedural style and thus the declarativeness in them is not so prominent as in conventional query languages like SQL. In this paper, we propose a declarative pattern-based functional XML query language named XML Tree Query (XTQ). XTQ adopts expressive composite patterns to present data extraction, meanwhile establishing the conjunctive, the disjunctive and the hierarchical relationships among data elements. It uses the matching terms, a composite structure of the variables bound to the matched data elements, to present a global sketch of the extracted data, and develops a deductive restructuring mechanism of matching terms to indicate data transformation, especially for restructuring hierarchy and handling heterogeneity. Based on matching terms, XTQ employs a coherent approach to function declaration and invocation to consistently extract and construct composite data structure, which integrates features of conventional functional languages and pattern-based query languages. Additionally, XTQ also supports data filtering on composite data structure such as hierarchical data, which is seldom deliberately considered in other studies. We demonstrate with various examples that XTQ can declaratively present complex XML queries which are common in practice.

研究动机与目标

  • 解决现有 XML 查询语言在处理涉及层次结构、异构性和嵌套数据集的复杂查询时声明性不足的问题。
  • 提供一个统一框架,显式建模 XML 文档中数据元素之间的合取、析取和层次关系。
  • 支持对复合数据结构(尤其是嵌套和半结构化 XML 数据)的一致性数据过滤、转换和构建。
  • 以保持声明性和组合清晰性的方式,将函数式编程特性与基于模式的查询相结合。

提出的方法

  • XTQ 使用表达性强的复合模式来表示数据提取,并定义元素之间的关系,包括合取、析取和层次组合。
  • 引入匹配项——将变量绑定到匹配数据元素的复合结构——以提供提取数据的全局概览。
  • 采用归纳重构机制对匹配项进行变换,实现声明式数据转换和层次结构重组。
  • 该语言支持基于匹配项的函数声明与调用,确保在提取和构建复杂数据结构时的一致性。
  • 使用 'par' 和 'with' 等连接词,实现对析取和层次数据结构的一致性过滤。
  • 系统通过虚拟函数文档值集成,支持高阶函数,风格与文档查询保持一致。

实验结果

研究问题

  • RQ1如何通过查询语言声明式地表达涉及分层重构和数据异构性的复杂 XML 查询?
  • RQ2哪些机制能够实现对 XML 数据中合取、析取和层次关系的连贯且表达性强的表示?
  • RQ3如何对 XML 中的复合数据结构(如嵌套集合和层次树)统一应用数据过滤?
  • RQ4匹配项及其重构在实现无需过程代码的声明式数据转换中起到什么作用?
  • RQ5如何将函数式编程特性无缝集成到基于模式的 XML 查询语言中?

主要发现

  • 与 XQuery、Xcerpt 或 TQL 等现有语言相比,XTQ 在表达涉及析取和层次数据关系的复杂 XML 查询时,提供了更强大且连贯的框架。
  • 通过使用匹配项和归纳重构机制,实现了数据结构的声明式转换,减少了对过程式子查询的依赖。
  • XTQ 通过 'par' 和 'with' 连接词实现了对复合数据结构的一致性过滤,而这一功能在大多数现有 XML 查询语言中并未原生支持。
  • 通过虚拟文档值实现的高阶函数等函数式编程特性,增强了语言的表达能力,同时保持了声明性。
  • 基于操作语义的原型实现证明了其可行性,当前工作重点在于性能优化,以及扩展对标签-关键字查询和基于模式的结构的支持。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。