Converting Complex Natural Language Query to SQL Based on Tree Representation Model
Author:
Affiliation:

Clc Number:

TP311

Fund Project:

  • Article
  • |
  • Figures
  • |
  • Metrics
  • |
  • Reference
  • |
  • Related
  • |
  • Cited by
  • |
  • Materials
  • |
  • Comments
    Abstract:

    NL2SQL refers to a technology that automatically converts query expressed in natural language into a structured SQL expression, which can be parsed and executed by the DBMS. NL2SQL can provide ordinary users with a natural interactive interface for database query access, thereby realizing question-answering atop database systems. NL2SQL for complex queries is now a research hotspot in the database community. The most prevalent approach uses the sequence-to-sequence (Seq2seq) encoder and decoder to convert complex natural language to SQL. However, most of the existing work focuses on English language. This approach is not ready to address the special colloquial expressions in Chinese queries. In addition, the existing work cannot correctly output query clauses containing complex calculation expressions. To solve the above problems, this study proposes to use a tree model instead of the sequence representation. The proposed approach disassembles complex queries from top to down to comprise a multi-way tree, where the tree nodes represent the elements of SQL. It uses a depth-first search to predict and generate SQL statements. The proposed approach has achieved the championship and 1st runner-up in two official tests of DuSQL Chinese NL2SQL Competition. The experimental results confirm the effectiveness of the proposed approach.

    Reference
    Related
    Cited by
Get Citation

赵猛,陈珂,寿黎但,伍赛,陈刚.基于树状模型的复杂自然语言查询转SQL技术研究.软件学报,2022,33(12):4727-4745

Copy
Share
Article Metrics
  • Abstract:
  • PDF:
  • HTML:
  • Cited by:
History
  • Received:January 27,2021
  • Revised:December 15,2021
  • Adopted:
  • Online: May 24,2022
  • Published: December 06,2022
You are the firstVisitors
Copyright: Institute of Software, Chinese Academy of Sciences Beijing ICP No. 05046678-4
Address:4# South Fourth Street, Zhong Guan Cun, Beijing 100190,Postal Code:100190
Phone:010-62562563 Fax:010-62562533 Email:jos@iscas.ac.cn
Technical Support:Beijing Qinyun Technology Development Co., Ltd.

Beijing Public Network Security No. 11040202500063