Query Lifting: Language-integrated query for heterogeneous nested collections

01/11/2021
by   Wilmer Ricciotti, et al.
0

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.

READ FULL TEXT
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

11/26/2020

Strongly-Normalizing Higher-Order Relational Queries

Language-integrated query is a powerful programming construct allowing d...
10/25/2019

Rumble: data independence when data is in a mess

This paper introduces Rumble, an engine that executes JSONiq queries on ...
09/02/2020

The Optics of Language-Integrated Query

Monadic comprehensions reign over the realm of language-integrated query...
11/12/2020

Scalable Querying of Nested Data

While large-scale distributed data processing platforms have become an a...
11/14/2020

Synthesis of SQL Queries from South African Local Language Narrations

English remains the language of choice for database courses and widely u...
05/06/2019

Language-integrated provenance by trace analysis

Language-integrated provenance builds on language-integrated query techn...
04/25/2019

Ephemeral Data Handling in Microservices - Technical Report

In modern application areas for software systems --- like eHealth, the I...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.