查询提升:异构嵌套集合的数据库集成查询
Query Lifting: Language-integrated query for heterogeneous nested collections
摘要:
基于解析语法的数据库集成查询是安全数据库编程的一种强大技术,并为高级技术(如查询分解或查询扁平化)提供了基础,这些高级技术允许对复杂的嵌套集合进行高效编程。然而,这些技术的基础是缺乏的:虽然SQL,最广泛使用的数据库查询语言,支持异构查询,混合集和多集语义,这些重要的功能不支持已知的正确性结果或实现,假设同构集合。在本文中,我们研究语言集成查询的异构查询语言$NRC_λ(Set,Bag)$,结合了集和多集结构。我们将展示如何规范化和翻译查询SQL,并开发一种新的方法来查询异构嵌套集合,基于洞察力的“本地”查询子表达式,计算嵌套的子集合可以被“提升”到顶级类似于本地函数定义的提升。
英文摘要:
Language-integrated query based on comprehension syntax is a powerful technique for safe database programming, and provides a basis for advanced techniques such as query shredding or query flattening that allow efficient programming with complex nested collections. However, the foundations of these techniques are lacking: although SQL, the most widely-used database query language, supports heterogeneous queries that mix set and multiset semantics, these important capabilities are not supported by known correctness results or implementations that assume homogeneous collections. In this paper we study language-integrated query for a heterogeneous query language $NRC_λ(Set,Bag)$ that combines set and multiset constructs. We show how to normalize and translate queries to SQL, and develop a novel approach to querying heterogeneous nested collections, based on the insight that ``local'' query subexpressions that calculate nested subcollections can be ``lifted'' to the top level analogously to lambda-lifting for local function definitions.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。