Formation of SQL from Natural Language Query using NLP








Abstract

Today, everyone has their own personal devices that connects to the internet. Every user tries to get the information that they require through internet. Most of the information is in the form of a database. A user who wants to access a database but having limited or no knowledge of database languages faces a challenging and difficult situation. Hence, there is a need for a system that enables the users to access the information in the database. This paper aims to develop such a system using NLP by giving structured natural language question as input and receiving SQL query as the output, to access the related information from the railways reservation database with ease. The steps involved in this process are tokenization, lemmatization, parts of speech tagging, parsing and mapping. The dataset used for the proposed system has a set of 2880 structured natural language queries on train fare and seats available. We have achieved 98.89 per cent accuracy. The paper would give an overall view of the usage of Natural Language Processing (NLP) and use of regular expressions to map the query in English language to SQL.


Modules


Algorithms


Software And Hardware

• Hardware: Processor: i3 ,i5 RAM: 4GB Hard disk: 16 GB • Software: operating System : Windws2000/XP/7/8/10 Anaconda,jupyter,spyder,flask Frontend :-python Backend:- MYSQL