SQL Generation and PL/SQL Execution from Natural Language Processing

Similar documents
database, Database Management system, Semantic matching, Tokenizer.

V. Thulasinath M.Tech, CSE Department, JNTU College of Engineering Anantapur, Andhra Pradesh, India

ACCESSING DATABASE USING NLP

Natural Language to Database Interface

Pattern Based Approach for Natural Language Interface to Database

GRAPHICAL USER INTERFACE AND RELATIONAL DATABASE ACCESSING USING NLP

Human Language Query Processing in Temporal Database using Semantic Grammar

Maximum Entropy based Natural Language Interface for Relational Database

INTERNATIONAL JOURNAL OF COMPUTER ENGINEERING & TECHNOLOGY (IJCET) CONTEXT SENSITIVE TEXT SUMMARIZATION USING HIERARCHICAL CLUSTERING ALGORITHM

Research Article. August 2017

Natural Language Interface for Databases in Hindi Based on Karaka Theory

PUNJABI LANGUAGE INTERFACE TO DATABASE

Possibility of Amharic Query Processing in Database using Natural Language Interface

Intelligent Hands Free Speech based SMS System on Android

INTRODUCTION TO COMPILER AND ITS PHASES

Sample Question Paper

THE METHOD OF AUTOMATED FORMATION OF THE SEMANTIC DATABASE MODEL OF THE DIALOG SYSTEM

An Ameliorated Methodology to Eliminate Redundancy in Databases Using SQL

A NOVAL HINDI LANGUAGE INTERFACE FOR DATABASES

Meta-Content framework for back index generation

User Task Automator. Himanshu Prasad 1, P. Geetha Priya 2, S.Manjunatha 3, B.H Namratha 4 and Rekha B. Venkatapur 5 1,2,3&4

An Object Oriented Programming with C

Mobile Application with Optical Character Recognition Using Neural Network

Implementation of Color based Android Shuffling Pattern Lock

Voice & Speech Based Security System Using MATLAB

NLP - Based Expert System for Database Design and Development

ER.STUFF. Kolhapur, Maharashtra, India.

Life Cycle of Source Program - Compiler Design

ENTROPY ENCODERS: HUFFMAN CODING AND ARITHMETIC CODING 1

Online Programming Assessment and Evaluation Platform. In Education System

Empirical Analysis of Single and Multi Document Summarization using Clustering Algorithms

Novel Security Method Using Captcha as Graphical Password

Compiler Design (40-414)

Implementation of Smart Question Answering System using IoT and Cognitive Computing

A Novel Architecture for Designing a Multimodal User Interface to Relational Databases

Design and Implementation of Search Engine Using Vector Space Model for Personalized Search

OCR For Handwritten Marathi Script

I. INTRODUCTION ABSTRACT

Prediction-Based NLP System by Boyer-Moore Algorithm for Requirements Elicitation

ITEC2620 Introduction to Data Structures

Komal Patiyal 1, Sanjay 2 1,2 Computer Science & Engineering, Himachal Pradesh Technical University,Hamirpur. IJRASET: All Rights are Reserved

CHAPTER 5 SEARCH ENGINE USING SEMANTIC CONCEPTS

A Survey on k-means Clustering Algorithm Using Different Ranking Methods in Data Mining

Analysis of Query Processing and Optimization

Interview Questions on DBMS and SQL [Compiled by M V Kamal, Associate Professor, CSE Dept]

Oracle SQL & PL SQL Course

Advanced Migration of Schema and Data across Multiple Databases

All In One Protective kit For Women

International Journal of Computer Science Trends and Technology (IJCST) Volume 3 Issue 3, May-June 2015

ISSN: [Sugumar * et al., 7(4): April, 2018] Impact Factor: 5.164

Leveraging Tokens in a Natural Language Query for NLIDB Systems

Why Relational Databases? Relational databases allow for the storage and analysis of large amounts of data.

P.G.D.C.M. (Semester I) Examination, : ELEMENTS OF INFORMATION TECHNOLOGY AND OFFICE AUTOMATION (2008 Pattern)

Table of Contents. PDF created with FinePrint pdffactory Pro trial version

Logging in. Your teacher will give you a login address during lectures or via .

INTELLIGENT BANKBOT SYSTEM

A Review Paper on SECA (Smart Electricity Controller and Automator)

Chapter. Relational Database Concepts COPYRIGHTED MATERIAL

A SURVEY OF DIFFERENT SEMANTIC AND ONTOLOGY BASED QUESTION ANSWERING SYSTEM

Building Construction Management System Using Android Application

Chapter 19. Understanding Queries and Signals

Data Store and Multi-Keyword Search on Encrypted Cloud Data

Information Retrieval Using Context Based Document Indexing and Term Graph

Oracle Database 10g: Introduction to SQL

If user is School. Fig On successful login you would be presented with screen as shown in Fig 2: Fig.2

A WEB BASED QUALITY FUNCTION INFORMATION MANAGEMENT, 1,2

Self-Demo Guide. Oracle ilearning and HTML DB

CISC 3140 (CIS 20.2) Design & Implementation of Software Application II

Query Optimization Based on Heuristic Rules

CS425 Fall 2016 Boris Glavic Chapter 1: Introduction

CST-402(T): Language Processors

ABSTRACT I. INTRODUCTION. Dr. J P Patra 1, Ajay Singh Thakur 2, Amit Jain 2. Professor, Department of CSE SSIPMT, CSVTU, Raipur, Chhattisgarh, India

ABSTRACT I. INTRODUCTION II. METHODS AND MATERIAL

International Journal of Computer Engineering and Applications, BIG DATA ANALYTICS USING APACHE PIG Prabhjot Kaur

What happens. 376a. Database Design. Execution strategy. Query conversion. Next. Two types of techniques

CSE450 Translation of Programming Languages. Lecture 4: Syntax Analysis

Query Optimization in OODBMS using Query Decomposition & Query Caching

Name :. Roll No. :... Invigilator s Signature : DATABASE MANAGEMENT SYSTEM

Pioneering Compiler Design

MARATHI TEXT-TO-SPEECH SYNTHESISYSTEM FOR ANDROID PHONES

(Cover Page) TITLE OF THE THESIS TITLE OF THE THESIS TITLE OF THE THESIS (Not more than 3 lines. CAPS Times New Roman Font size 20)

Kurzweil 3000 User s Guide

New Era of authentication: 3-D Password

D. Suresh Kumar, E. George Dharma Prakash Raj

24*7 Wagon Management System for Car Showroom

SQL for Palm Zhiye LIU MSc in Information Systems 2002/2003

Oracle SQL. murach s. and PL/SQL TRAINING & REFERENCE. (Chapter 2)

Computerized Attendance System Using Face Recognition

for (i=1; i<=100000; i++) { x = sqrt (y); // square root function cout << x+i << endl; }

Intelligent City Traffic Management and Public Transportation System

SQL. History. From Wikipedia, the free encyclopedia.

Product Review: James F. Koopmann Pine Horse, Inc. SoftTree s SQL Assistant. Product Review: SoftTree s SQL Assistant

Gesture based PTZ camera control

Oracle Login Max Length Table Name 11g Column Varchar2

Segmentation of Isolated and Touching characters in Handwritten Gurumukhi Word using Clustering approach

CSCE 314 Programming Languages

Secure ATM System with Biometric Fingerprints Technology

CMPE 152 Compiler Design

Compilers. Prerequisites

Position Tracking Using Fuzzy Logic

Transcription:

SQL Generation and PL/SQL Execution from Natural Language Processing Swapnil Kanhe Pramod Bodke Vaibhav Udawant Akshay Chikhale Abstract In this paper we proposes a method of executing query with the databases by using a natural language interface. This is major issue in the area of database management is to provide accurate results for the persons who doesn t know about language processing actually mean end user with less knowledge of Database and programming language. Normal users didn t know about the formal language like PL/SQL. The issue is that how they interact with the database system and retrieve the accurate results. This paper presents an interface module that converts user s query given in natural language like English into a corresponding PL/SQL command and gets actual results. We proposes the architecture for translating English Query into PL/SQL using Semantic Grammar Natural language processing is becoming one of the most active areas in Human-computer Interaction. In the previous system only SQL query is fired on database. This system architecture describe the PL/SQL query fire on database (For Example, Cursor, Procedure, Store Procedure, Etc.). A natural language query is translated to an equivalent PL/SQL query after processing through various stages. This project proposes translating English statement into PL/SQL Query using Semantic Grammar. Keywords Databases, Structured Query Language (SQL), Natural Language Interface for Databases (NLIDB), Natural Language Processing (NLP), Database Management System (DBMS), Procedural Language Structured Query language (PL/SQL). I. INTRODUCTION Natural Language is the language that is used by almost all human beings for communication in the real world. The term real world makes the problem much more difficult. While the term Natural Language (NL) known to be very convenient language and spoken by human beings, Natural Language Processing (NLP) is part of Artificial Intelligence (AI) that deals with systems and programs and communicate in natural language. Systems that are suitable for the processing and understanding natural language bridge between the man-machine communication barriers to a great extent. The main purpose of NLP is to enable communication between human and computers without execution of complex Commands and procedures. NLP is the techniques that can make the computer to understand the natural languages used by humans. Now a day s requirement of commercial system is to extracting data from a Database Management System such as MS Access, Oracle and others. Today one of the most targeted problems in the field of artificial intelligence (Computer Science) is to make machine this much interesting so then it can almost behave like a human being. The behaviors of human beings have been accomplished during machine implementation e.g. now days machines can hear with the use of microphone, speak by producing sound, see with the use of cameras, but still there are some areas where this machine development is not completely successful and some of them are to understand natural language, learning from experience and making autonomous decisions in real time environment etc. II. RELATED WORK A. LUNAR: LUNAR (1972) [4] is the system that uses two Databases for answering the questions like chemical Analysis and chemical References but there is some limitations on the lunar system, that Requires ATN Parser. ATN stands for the Augmented transition Network. There is some limitation on lunar system such as ATN network and also Wood s Procedural Semantics. B. PHILIQA: PHILIQA (1977) [2] is also system known as the best system for retrieving the results from the questioning, which uses a syntactic Analysis that runs on a separate pass from the semantic understanding passes. This system mainly deals with the problems of the semantics by using of the three separate layers of semantic understanding, these layers are called as the English Formal Language as the "World Model" or "Data Base Language". C. LIFER/LADDER: For retrieving the information of US Navy ships LIFER/LADDER (1978) [7] was designed as natural language interface to database and it is also known to be a first good database NLP systems. D. CHAT-80: CHAT-80 (1980) [3] is developed in the prolog language which is best known as Natural Language Interface to Database in the early of eighties. In the CHAT- 886

80 system English text is converted into prolog expressions, which were executed against the Prolog database. The code of CHAT-80 was broadcast widely and formed the basis of several other experimental Natural Language Interface to Database. E. ASK: ASK (1983) [1] was another system that permits the end-users to keep the system with new words and concepts in the interaction at the any stage by using the ASK system the dictionary of the database could be maintain. For providing own built-in database and to deal with the number of external database ASK was used as a complete information management system. ASK was used by the end users by requesting a Natural language. F. TEAM: In the 1987 TEAM [6] is widely used system, it is developed over many issues like portability. TEAM is designed as the database administrator, having no limitations like there is not necessary of having knowledge of the natural language interface to the database systems. G. RENDEZVOUS: There is also RENDEZVOUS (1977) [1] system, users can retrieve databases via natural language. In this Codd s system, special focuses on query. Paraphrasing and keep users busy in understanding dialogs when there is some problems occurred in parsing user input. III. SYSTEM DESCRIPTION We consider a database ORACLE or SQL Server. Within this database placed certain tables which are completely normalized. If the end user wants to retrieve the data from the table, he/she has to be technical knowledge of the PL/SQL language to make a query for the SQL Server database. Proposed system remove this part and enables the end user to access the tables in his/her language. So if we want to view information of all employee from Employee_dtl and Employee_Mst table then we are use the following SQL query: SELLECT Employee_Mst.*, Employee_dtl.* FROM Employee_Mst INNER JOIN Employee_dtl ON Employee_Mst.nID = Employee_dtl.nEmployeeID; But the User who doesn t know Microsoft SQL or ORACLE, will not be able to retrieve the database unless he/she knows the syntax and semantics of a query to the database. However using NLP, this process of accessing the database will be much easy. So the above query will be rewritten using NLP. IV. SYSTEM ARCHITECTURE This paper describe the use of NLP for interacting with the database using Natural language. In this work we use English language for providing the input. In this system we assume a Database SQL Server 2008 and Default Table is use which is properly arranged. A system is developed that reduce the problem end user to interact with the database with query language PL/SQL. The end user are able to access data by provide query in simple English language. The system is developed in.net Framework (C#) language. The different methods used for preparing the software can be given by following step [5]. A. Morphological Analysis: Separate words are analyzed into their components and non-word tokens such as punctuation are separated from the words. Morphology is the structure of word. It is also concerned with derivation of new words from existing ones, Ex. Lighthouse (formed from light house). B. Synthetic Analysis: Synthetic analysis structure indicates how the words are related to each other. Synthetic analysis is concerned with construction of sentences [5]. C. Semantic Analysis: Semantic analysis is concerned with the meaning of the language. In this stage assign the meaning of structure which is produce by synthetic analysis. D. Parsing: Determine the parse tree (grammatical analysis) of a given sentence. The grammar for natural languages is typical sentences have multiple possible analyses. This methods will be used for solving the problem [2]. Fig 1: Structure of the System Existing system includes the following modules: GUI: Designing the user interface where the user will enter the query in Natural Language (English). Parsing: Obtain the meaning of the Natural Query given by the user and parses it in its logical form [8]. Query Generation: After the successful scanning of the statement entered by the user, the system generates a query for the statement which is entered by the user in PL/SQL and then it gives corresponding information to the back end database. Data Collection: This module obtain the output of the PL/SQL statement which is entered by the end user and display it in the User Interface Screen in the form of result. 887

V. OVERVIEW OF THE PROCESS First, the English input (in the form of a list) is scanned by the semantic analysis, after table and attribute names are compared by postprocessor and if match found then joins the tables if the query include number of tables. Then the post-processor can build the PL/SQL query and appropriate output for it. The purpose of a natural language interface is to provide the user to computer in easiest way. For this purpose, we should develop a specific dictionary to keep the similar words of the columns and tables Names. The addition of similar words makes it happen for the user to express a sentence in different easiest ways. Fig 2: Database Semantics Divide Query which emphasis on the connector tokens. For specify primary condition in query use connector words. After connector token retrieve the attributes and values. For obtained attribute and resultant table map the words. Change synonyms with appropriate attribute names Transform English query into the Result. VIII. RESULT The graphical User Interface is as shown below. The user should be login and then connect to the database. A database setting is required to access the database after getting the information about host name, database name, user name and the password. When the database is ready for the use, English Query can translate very complex English queries to SQL with the capability of searching multiple tables and multiple fields. Steps followed to get the result:- Type the Natural Language Statement into the Dialog box. Click on Submit button. The correct result of the SQL Query is display on the Screen. Following Example describe SQL statement translated by English Query:- VI. SCOPE OF THE SYSTEM Scope of the proposed system is given below: To deal with any RDBMS we should know the syntax of the commands of that database software (SQL Server, Microsoft SQL, Oracle, etc.). Natural language processing is done on English language i.e. Input take as English Statement. Input from the end user is taken in the form of questions (wh- form like what, who, where, etc). Or like give etc. All of the possible words are included in the particular dictionary which is related to a system. Data dictionary is regularly updated when we add some information in the database. Data Duplication among the words will be taken care while processing the Query. Scanning (Tokenization) VII. ALGORITHM Break the Query in Appropriate tokens. Identify the tokens and numbered it. Identify the words that works as connector. Fig. 3: Result of query English Query: - Give me list of all employee. Meaning of Query: - Details of the employee with the Address, salary etc. PL/SQL Query: - SELLECT Employee_Mst.*, Employee_dtl.* FROM Employee_Mst INNER JOIN Employee_dtl ON Employee_Mst.nID = Employee_dtl.nEmployeeID; The next step of the research is to solve more complex queries. 888

IX. CONCLUSION In this work we try to achieve that system is able to execute both PL/SQL queries, input by the user in his/her natural language (English). Natural Language Processing can bring powerful enhancement to virtually any computer program interface. An SQL server Database is used to store the data. Execution of the query is done by using semantic grammar technique. The aim of our project is to accommodate more and more complex queries. ACKNOWLEDGMENT Our special thanks to Prof. P.A. Kale for continuous inspiration and valuable guidance in throughout our dissertation work. REFERENCE [1] Gauri Rao et al, NATURAL LANGUAGE QUERY PROCESSING USING SEMANTIC GRAMMAR, International Journal on Computer Science and Engineering, Vol. 02, 219-223, 2010. [2] Saravjeet Kaur, Rashmeet Singh Bali, Student, MMU, Mullana, SQL GENERATION AND EXECUTION FROM NATURAL LANGUAGE PROCESSING, International Journal of Computing Business Research ISSN (Online): 22296166 [3] Arati K. Deshpande and Prakash. R. Devale Student and Professor & Head, Department of Information Technology, Bharati Vidyapeeth Deemed University, Pune, India, NATURAL LANGUAGE QUERY PROCESSING USING PROBABILISTIC CONTEXT FREE GRAMMAR, International Journal of Advances in Engineering & Technology, May 2012. ISSN: 2231-1963 [4] Anil M. Bhadgale, Sanhita R. Gavas, Meghana M. Patil & Pinki R. Goyal Pvg S COET, Pune, Maharashtra, India, NATURAL LANGUAGE TO SQL CONVERSION SYSTEM, International Journal of Computer Science Engineering and Information Technology Research (IJCSEITR) ISSN 2249-6831 Vol. 3, Issue 2, Jun 2013, 161-166. [5] Ashish Tamrakar, Deepty Dubey Dept. of CSE, Chhatrapati Sivaji Institute of Technology, CG, India, Query Optimization using Natural Language Processing, IJCST Vol. 3, Issue 1, Jan. - March 2012. [6] Anuradha Mohite, Varunakshi Bhojane, CHALLENGES AND IMPLEMENTATION STEPS OF NATURAL LANGUAGE INTERFACE FOR INFORMATION EXTRACTION FROM DATABASE, International Journal of Recent Technology and Engineering (IJRTE) ISSN: 2277-3878, Volume-3, Issue-1, March 2014 [7] Mrs. Neelu Nihalani, Dr. Sanjay Silakari, Dr. Mahesh Motwani, NATURAL LANGUAGE INTERFACE FOR DATABASE: A BRIEF REVIEW, IJCSI International Journal of Computer Science Issues, Vol. 8, Issue 2, March 2011 ISSN (Online): 1694-0814 [8] Jasmeen Kaur, Bhawna chauhan, Jatinder Kaur Korepal, Implementation of Query Processor Using Automata and Natural Language Processing, International Journal of Scientific and Research Publications, Volume 3, Issue 5, May 2013 ISSN 2250-3153 889