Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
80 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
7 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Query Lifting: Language-integrated query for heterogeneous nested collections (2101.04102v2)

Published 11 Jan 2021 in cs.PL and cs.DB

Abstract: 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 belifted'' to the top level analogously to lambda-lifting for local function definitions.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (2)
  1. Wilmer Ricciotti (11 papers)
  2. James Cheney (62 papers)
Citations (5)