Generating SQL queries using natural language syntactic dependencies and metadata

Alessandra Giordani, Alessandro Moschitti

Research output: Chapter in Book/Report/Conference proceedingConference contribution

6 Citations (Scopus)

Abstract

This research concerns with translating natural language questions into SQL queries by exploiting the MySQL framework for both hypothesis construction and thesis verification in the task of question answering. We use linguistic dependencies and metadata to build sets of possible SELECT and WHERE clauses. Then we exploit again the metadata to build FROM clauses enriched with meaningful joins. Finally, we combine all the clauses to get the set of all possible SQL queries, producing an answer to the question. Our algorithm can be recursively applied to deal with complex questions, requiring nested SELECT instructions. Additionally, it proposes a weighting scheme to order all the generated queries in terms of probability of correctness. Our preliminary results are encouraging as they show that our system generates the right SQL query among the first five in the 92% of the cases. This result can be greatly improved by re-ranking the queries with a machine learning methods.

Original languageEnglish
Title of host publicationLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Pages164-170
Number of pages7
Volume7337 LNCS
DOIs
Publication statusPublished - 24 Jul 2012
Externally publishedYes
Event17th International Conference on Applications of Natural Language to Information Systems, NLDB 2012 - Groningen, Netherlands
Duration: 26 Jun 201228 Jun 2012

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume7337 LNCS
ISSN (Print)03029743
ISSN (Electronic)16113349

Other

Other17th International Conference on Applications of Natural Language to Information Systems, NLDB 2012
CountryNetherlands
CityGroningen
Period26/6/1228/6/12

    Fingerprint

Keywords

  • Information Schema
  • Metadata
  • Natural Language Processing
  • Question Answering
  • SQL

ASJC Scopus subject areas

  • Computer Science(all)
  • Theoretical Computer Science

Cite this

Giordani, A., & Moschitti, A. (2012). Generating SQL queries using natural language syntactic dependencies and metadata. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 7337 LNCS, pp. 164-170). (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); Vol. 7337 LNCS). https://doi.org/10.1007/978-3-642-31178-9_16