Table of Contents
Fetching ...

A Survey on Text-to-SQL Parsing: Concepts, Methods, and Future Directions

Bowen Qin, Binyuan Hui, Lihan Wang, Min Yang, Jinyang Li, Binhua Li, Ruiying Geng, Rongyu Cao, Jian Sun, Luo Si, Fei Huang, Yongbin Li

TL;DR

This survey comprehensively catalogs text-to-SQL parsing, detailing problem formulations, evaluation protocols, and a wide range of single-turn and multi-turn datasets. It synthesizes encoder-decoder architectures, including LSTM and Transformer-based encoders, graph-structured representations, and sketch- versus generation-based decoders, while highlighting the impact of pre-trained tabular language models (TaLMs) and specialized pre-training objectives. The paper then surveys data construction methods, input encoding strategies, and diverse pre-training objectives (MLM, schema linking, SQL execution, and context modeling), followed by a discussion of future directions such as cross-domain generalization, scalable tabular encoding, robustness, interpretability, and privacy. Collectively, it maps the current landscape and outlines practical avenues to improve NL-driven SQL generation for real-world, diverse database applications.

Abstract

Text-to-SQL parsing is an essential and challenging task. The goal of text-to-SQL parsing is to convert a natural language (NL) question to its corresponding structured query language (SQL) based on the evidences provided by relational databases. Early text-to-SQL parsing systems from the database community achieved a noticeable progress with the cost of heavy human engineering and user interactions with the systems. In recent years, deep neural networks have significantly advanced this task by neural generation models, which automatically learn a mapping function from an input NL question to an output SQL query. Subsequently, the large pre-trained language models have taken the state-of-the-art of the text-to-SQL parsing task to a new level. In this survey, we present a comprehensive review on deep learning approaches for text-to-SQL parsing. First, we introduce the text-to-SQL parsing corpora which can be categorized as single-turn and multi-turn. Second, we provide a systematical overview of pre-trained language models and existing methods for text-to-SQL parsing. Third, we present readers with the challenges faced by text-to-SQL parsing and explore some potential future directions in this field.

A Survey on Text-to-SQL Parsing: Concepts, Methods, and Future Directions

TL;DR

This survey comprehensively catalogs text-to-SQL parsing, detailing problem formulations, evaluation protocols, and a wide range of single-turn and multi-turn datasets. It synthesizes encoder-decoder architectures, including LSTM and Transformer-based encoders, graph-structured representations, and sketch- versus generation-based decoders, while highlighting the impact of pre-trained tabular language models (TaLMs) and specialized pre-training objectives. The paper then surveys data construction methods, input encoding strategies, and diverse pre-training objectives (MLM, schema linking, SQL execution, and context modeling), followed by a discussion of future directions such as cross-domain generalization, scalable tabular encoding, robustness, interpretability, and privacy. Collectively, it maps the current landscape and outlines practical avenues to improve NL-driven SQL generation for real-world, diverse database applications.

Abstract

Text-to-SQL parsing is an essential and challenging task. The goal of text-to-SQL parsing is to convert a natural language (NL) question to its corresponding structured query language (SQL) based on the evidences provided by relational databases. Early text-to-SQL parsing systems from the database community achieved a noticeable progress with the cost of heavy human engineering and user interactions with the systems. In recent years, deep neural networks have significantly advanced this task by neural generation models, which automatically learn a mapping function from an input NL question to an output SQL query. Subsequently, the large pre-trained language models have taken the state-of-the-art of the text-to-SQL parsing task to a new level. In this survey, we present a comprehensive review on deep learning approaches for text-to-SQL parsing. First, we introduce the text-to-SQL parsing corpora which can be categorized as single-turn and multi-turn. Second, we provide a systematical overview of pre-trained language models and existing methods for text-to-SQL parsing. Third, we present readers with the challenges faced by text-to-SQL parsing and explore some potential future directions in this field.
Paper Structure (47 sections, 8 equations, 4 figures, 5 tables)

This paper contains 47 sections, 8 equations, 4 figures, 5 tables.

Figures (4)

  • Figure 1: The comprehensive overview of the text-to-SQL parsing datasets, the pre-training tabular language models, the downstream text-to-SQL parsing approaches.
  • Figure 2: Example of schema linking structure used in wang2019rat.
  • Figure 3: Example of SQL sketch used in xu2017sqlnet.
  • Figure 4: Different contextual NL questions encoding strategies for multi-turn T2S parsing Liu2020HowFA.