Jisuanji kexue yu tansuo (Jul 2020)
Research on Technology of Generating Multi-table SQL Query Statement by Natural Language
Abstract
SQL (structured query language) query generation from natural language is not only one of the most important parts of constructing intelligent database query system, but also one of the difficulties in the individualized operation and maintenance of hybrid temporal big data in the new power supply rail transit system. At present, the deep learning models almost focus on SQL query generation in a single table, but cannot solve multi-table SQL query generation in database. In order to solve this problem, this paper adopts a method named SQL sketch filling to transform the sequence generation problem into multiple classification problems. In the process of training the deep learning models, this paper makes full use of the dependencies of components in SQL clauses. In the generation of multi-table JOIN path of FROM clause, it is modeled as Steiner Tree problem and solved by a globally optimal algorithm. This method is validated on an open text-to-SQL dataset named Spider. The experimental results show that the model can improve the query-match accuracy of multi-table SQL query generation.
Keywords