Nov 2026· Journal of Software and Systems Modeling· 0 citations· 17 references
TL;DR
BLAST is presented, 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.
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.
Query rewriting and semantic evaluation of text-to-SQL systems both depend on deciding whether two SQL queries return the same result on every database satisfying the schema constraints. Decades of equivalence-preserving optimizer rules provide a natural basis for constructive proofs: two queries are equivalent when ad...
This paper rewriting queries written against triple terms into queries over the reification pattern actually used by each source, expressing the relationship as a SPARQL CONSTRUCT query that is unfolded into the user’s query.
Materials scientists increasingly combine information from several public databases, each with its own interface, schema, units and calculation conventions. MatQuery is a prototype and experimental infrastructure for studying how a natural-language request can be turned into queries over such databases and how the retu...
This work introduces HARE (History-AwaRe Text-to-SQL BEnchmark) to measure the accuracy and cost of adapting historical SQL, and stores whole-query templates, reusable SQL blocks, and mappings from domain concepts to schema elements in MEM-SQL, a Memory-EMpowered Text-to-SQL system.
Xiao-Qi Wang, Wen-Qi Pei, Shizheng Hou et al.· 0 citations
Text-to-SQL translates natural language questions into SQL queries, enabling database access without writing SQL. Fine-tuning open-weight large language models (LLMs) is cost-effective, but existing methods treat SQL as ordinary text and optimize token-level likelihood without explicitly modeling its syntactic, semanti...
The Natural Language to SQL Query Generator is an intelligent system designed to allow users to retrieve information from databases by asking questions in simple natural language. Traditionally, users need knowledge of SQL syntax to interact with relational databases. This creates difficulties for non-technical users w...
B. Divya, V. Vaishnavi, E. H. Charan et al.· International Journal of Eng...· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.