AST Based Sequence to Sequence Natural Language Question to SQL Method

Slides:



Advertisements
Similar presentations
A Guide to SQL, Seventh Edition. Objectives Use joins to retrieve data from more than one table Use the IN and EXISTS operators to query multiple tables.
Advertisements

Basic SQL Introduction Presented by: Madhuri Bhogadi.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Query-By-Example (QBE) 2440: 180 Database Concepts.
Introduction to Structured Query Language (SQL)
Introduction to Oracle9i: SQL1 Basic SQL SELECT Statements.
Environments and Evaluation
C++ for Engineers and Scientists Third Edition
Chapter 2 Basic SQL SELECT Statements
Syntax Directed Translation. Syntax directed translation Yacc can do a simple kind of syntax directed translation from an input sentence to C code We.
Chapter 2 Basic SQL SELECT Statements Oracle 10g: SQL.
1 Chapter 4: Selection Structures. In this chapter, you will learn about: – Selection criteria – The if-else statement – Nested if statements – The switch.
SQL: Data Manipulation Presented by Mary Choi For CS157B Dr. Sin Min Lee.
7 1 Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Interpretation Environments and Evaluation. CS 354 Spring Translation Stages Lexical analysis (scanning) Parsing –Recognizing –Building parse tree.
Chapter 4 Multiple-Table Queries
Intro to SQL Management Studio. Please Be Sure!! Make sure that your access is read only. If it isn’t, you have the potential to change data within your.
1 Multiple Table Queries. 2 Objectives  Retrieve data from more than one table by joining tables  Using IN and EXISTS to query multiple tables  Nested.
Parse & Syntax Trees Syntax & Semantic Errors Mini-Lecture.
[ Part III of The XML seminar ] Presenter: Xiaogeng Zhao A Introduction of XQL.
Chapter 3 Describing Syntax and Semantics
Database UpdatestMyn1 Database Updates SQL is a complete data manipulation language that can be used for modifying the data in the database as well as.
We are learning to write expressions using variables. (8-1)
A Guide to SQL, Eighth Edition Chapter Six Updating Data.
An Effective SPARQL Support over Relational Database Jing Lu, Feng Cao, Li Ma, Yong Yu, Yue Pan SWDB-ODBIS 2007 SNU IDB Lab. Hyewon Lim July 30 th, 2009.
1 Chapter 2 Basic SQL SELECT Statements. 2 Chapter Objectives Distinguish between an RDBMS and an ORDBMS Identify keywords, mandatory clauses, and optional.
Programming Language C++ Lecture 3. Control Structures  C++ provides control structures that serve to specify what has to be done to perform our program.
Lecture 15: Query Optimization. Very Big Picture Usually, there are many possible query execution plans. The optimizer is trying to chose a good one.
Comp 311 Principles of Programming Languages Lecture 2 Syntax Corky Cartwright August 26, 2009.
 CONACT UC:  Magnific training   
Select Complex Queries Database Management Fundamentals LESSON 3.1b.
Context Free Grammars & Parsing CPSC 388 Fall 2001 Ellen Walker Hiram College.
IFS180 Intro. to Data Management Chapter 10 - Unions.
x ( ) + - x ÷ ( ) + - x ÷ ( ) ! B I D M A S
More SQL: Complex Queries, Triggers, Views, and Schema Modification
XML: Extensible Markup Language
A Simple Syntax-Directed Translator
Parsing Bottom Up CMPS 450 J. Moloney CMPS 450.
Parsing and Parser Parsing methods: top-down & bottom-up
SQL Creating and Managing Tables
Sequence, Selection, Iteration The IF Statement
Using the Set Operators
Writing Basic SQL SELECT Statements
Using the Set Operators
Programming Language Syntax 7
SQL Creating and Managing Tables
Database management concepts
SQL Creating and Managing Tables
Chapter 2: A Simple One Pass Compiler
Chapter 2 Views.
Writing Basic SQL SELECT Statements
Query Processing CSD305 Advanced Databases.
Computer Science and Engineering
Convert (flatten) IATI XML file to CSV file(s) using XQUERY
Contents Preface I Introduction Lesson Objectives I-2
Dialogue State Tracking & Dialogue Corpus Survey
Unsupervised Pretraining for Semantic Parsing
Natural Language to SQL(nl2sql)
Translating Natural Language Questions into SQL Queries
MDT OCL 1.3 Mini-deck June 10, 2009.
Query Optimization.
CPSC-608 Database Systems
High-Level Programming Language
Dennis Zhao,1 Dragomir Radev PhD1 LILY Lab
Geo-Databases: lecture 4 Complex Queries in SQL
Using the Set Operators
Objectives In this lesson, you will learn to:
កម្មវិធីបង្រៀន SQL Programming ជាភាសាខ្មែរ Online SQL Training Course
Database SQL.
Ben-Gurion University
Faculty of Computer Science and Information System
Presentation transcript:

AST Based Sequence to Sequence Natural Language Question to SQL Method Kai Yang, Tao Yu, Professor Dragomir Radev

Problem Description - Dataset WikiSQL: very simple SQL queries, only contains select … from table where … Atis/Geoquery/Scholar Same SQL queries show multiple times in dataset Same SQL queries show in both training and test dataset All SQL queries is corresponding to only one database

Problem Description - Evaluation Methods SQL queries exactly match order-insensitive in select clause Extra space or bracket does not change effectiveness of the queries SQL queries execution result match Different SQL queries could generate same query result (like empty set)

Data Prepared by LILY Project members About 60 Database About 5000 natural language and SQL query pairs

Evaluation Parse golden queries and generated queries into syntax tree Separate SQL queries into several components For each component, compare the different in tree structure of golden queries and generated queries

Approach Parse train SQL into AST and generate a sequence of ordered grammar rules (from top to down and from left to right) root->statement statement->result,from,where result->column,colum column->col1 column->col2 from->table table->table1 where->expression expression->left,operation,right left->column column->col3 operation->= right->literal literal->1 select col1,col2 from table1 where col3=1;

Approach

Result Can only predict column name that shows in training data Could not predict complex SQL queries (nested, compound clause) SQL Components Accuracy select 0.216 select_without_agg 0.140 select_agg 0.424 where_expression 0.029 where_operator 0.183 where_nested 0.040 group 0.047 order by 0.250 compound 0.000

Conclusion and Future Work We proposed a new dataset and evaluation method The model served as a baseline of our NL2SQL task The capacity of this model is limited We could make progress to improve the result