CUBES: A Parallel Synthesizer for SQL Using Examples

In recent years, more people have seen their work depend on data manipulation tasks. However, many of these users do not have the background in programming required to write SQL queries, particularly complex ones. One way of helping these users is automatically synthesizing the SQL query given a small set of examples. Several program synthesizers for SQL have been recently proposed, but they do not leverage multicore architectures to improve synthesis performance. This paper proposes Cubes , a parallel program synthesizer for the domain of SQL queries using input-output examples. Since input-output examples are an under-specification of the desired SQL query, sometimes, the synthesized query does not match the user’s intent. Cubes incorporates a new disambiguation procedure based on fuzzing techniques that interacts with the user and increases the confidence that the returned query matches the user intent. We perform an extensive evaluation on around 4000 SQL queries from different domains. Experimental results show that our sequential version can solve more instances than other state-of-the-art SQL synthesizers. Moreover, the parallel approach can scale up to 16 processes with super-linear speedups for many hard instances. Our disambiguation approach is critical to achieving an accuracy of around 60%, significantly larger than other SQL synthesizers.

Authors

Institutions

Publication Details

Journal
Formal Aspects of Computing
Published
2025-09-27
DOI
https://doi.org/10.1145/3768578
Primary Topic
Advanced Database Systems and Queries
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

CUBES: A Parallel Synthesizer for SQL Using Examples

Miguel Terra-Neves, Vasco Manquinho, Miguel Ventura, Ricardo Brancas et al.
Formal Aspects of Computing
Advanced Database Systems and Queries
article

CUBES: A Parallel Synthesizer for SQL Using Examples

Miguel Terra-Neves, Vasco Manquinho, Miguel Ventura, Ricardo Brancas, Ruben Martins
article en

Abstract

In recent years, more people have seen their work depend on data manipulation tasks. However, many of these users do not have the background in programming required to write SQL queries, particularly complex ones. One way of helping these users is automatically synthesizing the SQL query given a small set of examples. Several program synthesizers for SQL have been recently proposed, but they do not leverage multicore architectures to improve synthesis performance. This paper proposes Cubes , a parallel program synthesizer for the domain of SQL queries using input-output examples. Since input-output examples are an under-specification of the desired SQL query, sometimes, the synthesized query does not match the user’s intent. Cubes incorporates a new disambiguation procedure based on fuzzing techniques that interacts with the user and increases the confidence that the returned query matches the user intent. We perform an extensive evaluation on around 4000 SQL queries from different domains. Experimental results show that our sequential version can solve more instances than other state-of-the-art SQL synthesizers. Moreover, the parallel approach can scale up to 16 processes with super-linear speedups for many hard instances. Our disambiguation approach is critical to achieving an accuracy of around 60%, significantly larger than other SQL synthesizers.

Formal Aspects of Computing
Instituto de Engenharia de Sistemas e Computadores Investigação e Desenvolvimento (PT), University of Lisbon (PT), InterSystems (United States) (US), Carnegie Mellon University (US)
Openalex Percentile: Top 69%
Advanced Database Systems and Queries
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.