Abstract
AbstractLanguage-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 $$\mathcal {NRC}_{\lambda }( Set,Bag )$$
NRC
λ
(
S
e
t
,
B
a
g
)
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.
Publisher
Springer International Publishing
Cited by
6 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Object Graph Programming;Proceedings of the IEEE/ACM 46th International Conference on Software Engineering;2024-02-06
2. Comprehending queries over finite maps;International Symposium on Principles and Practice of Declarative Programming;2023-10-22
3. Language-Integrated Query for Temporal Data;Proceedings of the 21st ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences;2022-11-29
4. A Formalization of SQL with Nulls;Journal of Automated Reasoning;2022-07-27
5. Comprehending nulls;The 18th International Symposium on Database Programming Languages;2021-08-16