Query Lifting: Language-integrated query for heterogeneous nested collections

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract / Description of output

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.
Original languageEnglish
Title of host publicationProgramming Languages and Systems (ESOP 2021)
PublisherSpringer International Publishing
Number of pages28
ISBN (Electronic)978-3-030-72019-3
ISBN (Print)978-3-030-72018-6
Publication statusPublished - 23 Mar 2021
Event30th European Symposium on Programming - Online
Duration: 27 Mar 20211 Apr 2021
Conference number: 30

Publication series

NameLecture Notes in Computer Science
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349


Conference30th European Symposium on Programming
Abbreviated titleESOP 2021
Internet address

Keywords / Materials (for Non-textual outputs)

  • language-integrated query
  • nested relations
  • multisets


Dive into the research topics of 'Query Lifting: Language-integrated query for heterogeneous nested collections'. Together they form a unique fingerprint.

Cite this