An automatic SQL translation method for domestic database migration
Zesan Liu, Jing Zhang, Tian Tian, Zhihao Shen, Yangming Yu · 2025
The energy internet power marketing system (marketing 2.0) based on the State Grid cloud platform using microservices architecture is gradually carrying out the promotion and operation of the whole network province. Oracle database has big limitations in three aspects of business support, system development, operation, and maintenance, which seriously restricts the development of marketing 2.0. Therefore, the translation of Oracle database Structured Query Language (SQL) statements into domestic database SQL statements is an inevitable trend and of great significance. In this paper, based on the feature that there are a lot of similarities between Oracle database SQL statements and domestic database SQL statements, the Transformer model based on semantic information sharing is proposed to realize the automatic translation of Oracle database SQL statements to domestic database SQL statements by sharing the word list and embedding the layer parameter, and BLEU and EX are used as the evaluation indexes. Experiments show that the model achieves a BLEU value of 31.20 and an EX value of 84.3. Compared with the benchmark Transformer model, it improves the BLEU value by 13.28 and the EX by 13.3, which proves the effectiveness of the model.