2601.05579v1 Jan 09, 2026 cs.DB

RISE: 쿼리 축소를 통한 규칙 기반 SQL 방언 번역

RISE: Rule-Driven SQL Dialect Translation via Query Reduction

Xudong Xie
Xudong Xie
Citations: 5
h-index: 1
Yuwei Zhang
Yuwei Zhang
Citations: 547
h-index: 7
Wensheng Dou
Wensheng Dou
Institute of Software, Chinese Academy of Sciences
Citations: 951
h-index: 20
Yu Gao
Yu Gao
Citations: 374
h-index: 11
Ziyu Cui
Ziyu Cui
Citations: 144
h-index: 7
Jiansen Song
Jiansen Song
Institute of Software Chinese Academy of Sciences
Citations: 144
h-index: 7
Rui Yang
Rui Yang
Citations: 15
h-index: 2
Jun Wei
Jun Wei
Citations: 22
h-index: 3

서로 다른 관계형 데이터베이스 관리 시스템(RDBMS) 간의 SQL 방언을 번역하는 것은 RDBMS 기반 애플리케이션을 클라우드로 마이그레이션하는 데 매우 중요합니다. 기존의 SQL 방언 번역 도구는 수동으로 작성된 규칙에 의존하며, 새로운 RDBMS 및 방언을 지원하려면 상당한 수동 노력이 필요합니다. 대규모 언어 모델(LLM)은 SQL 방언 번역을 지원할 수 있지만, 긴 복잡한 SQL 쿼리를 처리하는 데 어려움을 겪는 경우가 많습니다. 본 논문에서는 긴 복잡한 SQL 쿼리를 정확하게 처리할 수 있는 새로운 LLM 기반 SQL 방언 번역 방법인 RISE를 제안합니다. 복잡한 소스 쿼리 $Q_c$가 주어지면, 해당 쿼리에 포함된 SQL 방언 $d$와 관련된 요소들을 제거하여 단순화된 쿼리 $Q_s$를 얻기 위해 방언 인지 쿼리 축소 기법을 사용합니다. 그런 다음, LLM을 사용하여 $Q_s$를 $Q_s^{'}$로 번역하고, $Q_s$와 $Q_s^{'}$ 간의 관계를 기반으로 방언 $d$에 대한 번역 규칙 $r_d$를 자동으로 추출합니다. $r_d$를 $Q_c$에 적용하면, $Q_c$ 내의 방언 $d$를 효과적으로 번역할 수 있으며, 이를 통해 소스 쿼리 $Q_c$의 복잡성을 우회할 수 있습니다. 우리는 RISE를 TPC-DS 및 SQLProcBench라는 두 가지 실제 벤치마크에서 평가하고, 번역 정확도 측면에서 기존의 규칙 기반 도구 및 LLM 기반 접근 방식과 비교했습니다. RISE는 TPC-DS에서 97.98%의 정확도를, SQLProcBench에서 100%의 정확도를 달성했으며, 각각 평균 24.62% 및 238.41%의 성능 향상을 보였습니다.

Original Abstract

Translating SQL dialects across different relational database management systems (RDBMSs) is crucial for migrating RDBMS-based applications to the cloud. Traditional SQL dialect translation tools rely on manually-crafted rules, necessitating significant manual effort to support new RDBMSs and dialects. Although large language models (LLMs) can assist in translating SQL dialects, they often struggle with lengthy and complex SQL queries. In this paper, we propose RISE, a novel LLM-based SQL dialect translation approach that can accurately handle lengthy and complex SQL queries. Given a complex source query $Q_c$ that contains a SQL dialect $d$, we first employ a dialect-aware query reduction technique to derive a simplified query $Q_{s}$ by removing $d$-irrelevant SQL elements from $Q_c$. Subsequently, we utilize LLMs to translate $Q_{s}$ into $Q_{s^{'}}$, and automatically extract the translation rule $r_d$ for dialect $d$ based on the relationship between $Q_{s}$ and $Q_{s^{'}}$. By applying $r_d$ to $Q_c$, we can effectively translate the dialect $d$ within $Q_c$, thereby bypassing the complexity of the source query $Q_c$. We evaluate RISE on two real-world benchmarks, i.e., TPC-DS and SQLProcBench, comparing its performance against both the traditional rule-based tools and the LLM-based approaches with respect to translation accuracy. RISE achieves accuracies of 97.98% on TPC-DS and 100% on SQLProcBench, outperforming the baselines by an average improvement of 24.62% and 238.41%, respectively.

1 Citations
0 Influential
10 Altmetric
51.0 Score
Original PDF

No Analysis Report Yet

This paper hasn't been analyzed by Gemini yet.

Log in to request an AI analysis.

댓글

댓글을 작성하려면 로그인하세요.

아직 댓글이 없습니다. 첫 번째 댓글을 남겨보세요!