DLBench: A Comprehensive Benchmark for SQL Translation with Large Language Models
Authors:
- 16 November 2025
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 854-866
Abstract
In recent years, the growing complexity of database management systems (DBMSs) and the proliferation of SQL dialects have created significant challenges for database migration, federation, and integration. These challenges arise from the disparities between SQL dialects across different DBMSs, hindering seamless communication and system interoperability. SQL translation, the process of converting SQL queries from a source dialect DBMS to a target dialect DBMS, plays a crucial role in addressing these challenges. To facilitate this process, we introduce DLBench, the first comprehensive benchmark designed to evaluate the SQL translation capabilities of Large Language Models (LLMs). The benchmark includes two datasets: BIRDTrans, which covers real-world database query scenarios across seven DBMSs, and ButterTrans, which spans a broader spectrum of SQL types and encompasses extensive DBMS dialect features. We collect high-quality databases and SQL statements, applying a rigorous multi-step cleaning process that ensures data quality through SQL92-based checks and dialect-specific parser validation. Additionally, both LLM-based and human annotations are used to guarantee the correctness and completeness of the dataset. We demonstrate the utility of DLBench through extensive experiments, which show that the benchmark effectively evaluates the SQL translation ability of LLMs. The results highlight the potential of LLMs for SQL translation tasks and provide insights into areas for further improvement.Keywords
This publication has 24 references indexed in Scilit:
- On the Evaluation of Neural Code Translation: Taxonomy and Benchmark2023
- Impact of Code Language Models on Automated Program Repair2023
- Competition-level code generation with AlphaCodeScience, 2022
- Deep Learning Based Vulnerability Detection: Are We There Yet?IEEE Transactions on Software Engineering, 2021
- An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine TranslationACM Transactions on Software Engineering and Methodology, 2019
- Key Opportunities and Challenges of Data Migration in Cloud: Results from a Multivocal Literature ReviewProcedia Computer Science, 2019
- Improving automatic source code summarization via deep reinforcement learning2018
- The ManyBugs and IntroClass Benchmarks for Automated Repair of C ProgramsIEEE Transactions on Software Engineering, 2015
- Defects4J: a database of existing faults to enable controlled testing studies for Java programs2014
- May the source be with youWork Study, 2000