BLAST: a tool for bidirectional logics to SQL translation

Abstract SQL is the main language used to query data in relational databases and interact with them. However, for accomplishing certain reasoning tasks (such as semantic query optimization, reasoning, query containment, etc), it is desirable to translate SQL into first-order languages (e.g., relational calculus, or Datalog). Indeed, a first-order logic formalism facilitates the analysis of SQL queries without having to depend on the nuances of their implementations. The possibility of this translation is already known due to the equivalence in expression power between relational algebra and relational calculus. Unfortunately, although this equivalence was discovered more than 40 years ago, to date there is no public, open-source, and validated tool to obtain these translations. This paper presents BLAST, an automatic and bidirectional translator between SQL expressions and first-order logic, focused on mapping SQL queries, views or assertions into logic queries, derivation rules, or logic constraints, and vice versa. The translator comes with two interfaces, a GUI one (for end users), and a Java API (for integrating the translator into other tools); and provides two different translation strategies depending on the user needs. To ensure that the code is easy to adopt, maintain, and contribute to, the whole project is based on metamodels.

Authors

Institutions

Publication Details

Journal
Software & Systems Modeling
Published
2026-11-07
DOI
https://doi.org/10.1007/s10270-026-01436-z
Primary Topic
Advanced Database Systems and Queries
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

BLAST: a tool for bidirectional logics to SQL translation

Xavier Oriol, Martí Sánchez Juanola, José Francisco Crespo, Ernest Teniente
Software & Systems Modeling
Advanced Database Systems and Queries
article

BLAST: a tool for bidirectional logics to SQL translation

Xavier Oriol, Martí Sánchez Juanola, José Francisco Crespo, Ernest Teniente
article en

Abstract

Abstract SQL is the main language used to query data in relational databases and interact with them. However, for accomplishing certain reasoning tasks (such as semantic query optimization, reasoning, query containment, etc), it is desirable to translate SQL into first-order languages (e.g., relational calculus, or Datalog). Indeed, a first-order logic formalism facilitates the analysis of SQL queries without having to depend on the nuances of their implementations. The possibility of this translation is already known due to the equivalence in expression power between relational algebra and relational calculus. Unfortunately, although this equivalence was discovered more than 40 years ago, to date there is no public, open-source, and validated tool to obtain these translations. This paper presents BLAST, an automatic and bidirectional translator between SQL expressions and first-order logic, focused on mapping SQL queries, views or assertions into logic queries, derivation rules, or logic constraints, and vice versa. The translator comes with two interfaces, a GUI one (for end users), and a Java API (for integrating the translator into other tools); and provides two different translation strategies depending on the user needs. To ensure that the code is easy to adopt, maintain, and contribute to, the whole project is based on metamodels.

Software & Systems Modeling
Universitat Politècnica de Catalunya (ES)
Universitat Politècnica de Catalunya
Openalex Percentile: Top 10%
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.

Laika access coming soon