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_\lambda(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.


翻译:基于理解语法的语言整合查询是安全数据库编程的有力技术,为查询碎条或查询平化等先进技术提供了基础,从而能够以复杂的嵌套收藏有效编程。然而,这些技术的基础仍然缺乏:虽然最广泛使用的数据库查询语言SQL支持混合组合和多设置语义的多样化查询,但这些重要能力没有已知的正确性结果或假定同质收藏的实施的支持。在本文中,我们研究混合查询语言 $NRC ⁇ lambda(Set,Bag) 的语言整合查询,该语言将集成和多设置构造结合起来。我们展示了如何将查询标准化和翻译到 SQL,并根据“本地查询”可计算嵌套子收藏的子表达式可以“提升”到顶级,类似于用于本地函数定义的 lamda 提升。

0
下载
关闭预览

相关内容

在数学中,多重集是对集的概念的修改,与集不同,集对每个元素允许多个实例。 为每个元素提供的实例的正整数个数称为该元素在多重集中的多重性。 结果存在无限多个多重集,它们仅包含元素a和b,但因元素的多样性而变化:(1)集{a,b}仅包含元素a和b,当将{a,b}视为多集时,每个元素的多重性为1;(2)在多重集{a,a,b}中,元素a具有多重性2,而b具有多重性1;(3)在多集{a,a,a,b,b,b}中,a和b都具有多重性3。
2019年机器学习框架回顾
专知会员服务
35+阅读 · 2019年10月11日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
最新BERT相关论文清单,BERT-related Papers
专知会员服务
52+阅读 · 2019年9月29日
LibRec 精选:AutoML for Contextual Bandits
LibRec智能推荐
7+阅读 · 2019年9月19日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
【TED】生命中的每一年的智慧
英语演讲视频每日一推
9+阅读 · 2019年1月29日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
LibRec 精选:连通知识图谱与推荐系统
LibRec智能推荐
3+阅读 · 2018年8月9日
已删除
将门创投
4+阅读 · 2018年6月4日
Arxiv
0+阅读 · 2021年3月12日
VIP会员
相关资讯
LibRec 精选:AutoML for Contextual Bandits
LibRec智能推荐
7+阅读 · 2019年9月19日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
【TED】生命中的每一年的智慧
英语演讲视频每日一推
9+阅读 · 2019年1月29日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
LibRec 精选:连通知识图谱与推荐系统
LibRec智能推荐
3+阅读 · 2018年8月9日
已删除
将门创投
4+阅读 · 2018年6月4日
Top
微信扫码咨询专知VIP会员