0% found this document useful (0 votes)
3 views21 pages

MP SQL

The document presents a mini project titled 'AI Based SQL Chatbot' aimed at simplifying database access through natural language queries, eliminating the need for users to know SQL. The proposed system utilizes a transformer-based architecture called Neural-Query Bridge (NQB) to automatically translate user input into SQL, improving data accessibility for non-technical users. The project highlights the importance of democratizing data usage and addresses challenges such as data literacy gaps and security concerns.

Uploaded by

tamillana2
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views21 pages

MP SQL

The document presents a mini project titled 'AI Based SQL Chatbot' aimed at simplifying database access through natural language queries, eliminating the need for users to know SQL. The proposed system utilizes a transformer-based architecture called Neural-Query Bridge (NQB) to automatically translate user input into SQL, improving data accessibility for non-technical users. The project highlights the importance of democratizing data usage and addresses challenges such as data literacy gaps and security concerns.

Uploaded by

tamillana2
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

AI Based SQL Chatbot

Submitted in partial fulfillment of the requirements of the Mini project in


Semester IV of Second Year Artificial Intelligence & Data Science
Engineering

by
Meet Meher (27 )
Bhupati Nadar (28 )
Vivaan Nair(29 )

Under the guidance of


Ms. Rujuta Vartak

University of Mumbai

Vidyavardhini's College of Engineering & Technology

Department of Artificial Intelligence and Data Science

(A.Y. 2025-26)
CERTIFICATE

This is to certify that the Mini Project entitled “AI Based SQL Chatbot” is

a bonafide work of Meet Meher(27), Bhupati Nadar (28), Vivaan Nair (29)

, submitted to the University of Mumbai in partial fulfillment of the

requirement for the award of the degree of “Bachelor of Engineering” in

Semester IV of Second Year “Artificial Intelligence and Data Science”.

_____________________
Ms. Rujuta Vartak

______________________ _____________________
Dr. Tatwadarshi Nagarhalli Dr. Rakesh Himte
HOD AI &DS Principal
Mini Project Approval

This Mini Project entitled “AI Based SQL Chatbot” by Meet Meher(27),

Bhupati Nadar (28), Vivaan Nair (28) is approved for the degree of

Bachelor of Engineering in in Semester IV of Second Year Artificial

Intelligence and Data Science.

Examiners

1………………………………................
(Internal Examiner Name & Sign)

2…………………………………………
(External Examiner name & Sign)

Date:

Plac
Acknowledgments

I would like to thank all people whose support and cooperation has been an invaluable asset
during this Project. I would also like to thank our Guide Prof. Rujuta Vartak, for guiding me
throughout this project and giving it the present shape. It would have been impossible to
complete the project without his/her support, valuable suggestions, criticism, encouragement,
and guidance.

I convey my gratitude to Dr. Tatwadarshi Nagarhalli, Head of Department for their motivation
and providing various facilities, which helped us greatly in the whole process of this project.
I am also grateful to all other teaching and non-teaching staff members of the Artificial
Intelligence and Data Science Department for directly or indirectly helping us with the
completion of projects and the resources provided.

------------------------------
Meet Meher (26)

------------------------------
Bhupati Nadar(27)

------------------------------
Vivaan Nair(28)

Date:
Abstract

The modern digital landscape generates vast amounts of structured data, yet accessing this
data remains challenging for many users due to the need for Structured Query Language
(SQL). To address this issue, we propose an AI-based Natural Language Interface to Database
(NLIDB), which allows users to retrieve data using everyday language. This system translates
natural language queries into SQL automatically, reducing dependency on technical expertise.

Our approach introduces the Neural-Query Bridge (NQB), a transformer-based architecture


optimized for Text-to-SQL tasks. The system dynamically connects with database schemas,
identifying tables, relationships, and keys to generate accurate and context-aware queries. It
also employs semantic parsing to interpret ambiguous terms (e.g., “top-performing”) into
precise measurable conditions. A built-in feedback mechanism ensures query correctness and
provides plain-language explanations, improving transparency and user trust.

One of the major challenges in organizations today is the “data literacy gap,” where only a
limited number of professionals can effectively query databases. This often leads to over-
reliance on data teams and slower decision-making. By enabling natural language access, the
proposed system democratizes data usage, allowing non-technical users to quickly extract
insights. The system also incorporates conversational memory, enabling users to ask follow-
up questions without repeating context, making interactions more natural and efficient.

Additionally, security is addressed through role-based access control, ensuring users only
retrieve authorized data, along with a verification layer that explains generated SQL in a
human-readable format. Unlike traditional NLIDB systems, the NQB model is database-
agnostic and adaptable across platforms like MySQL, PostgreSQL, and Oracle. It also
includes uncertainty detection, prompting users for clarification when queries are vague,
thereby reducing [Link] research highlights how natural language interfaces can
transform databases from static repositories into interactive systems. By simplifying data
access, organizations can shift focus from technical querying to data-driven decision-making,
ultimately improving efficiency and inclusivity.
List of Abbreviations

1. SQL – Structured Query Language


2. NLIDB – Natural Language Interface to Database
3. NQB – Neural-Query Bridge
4. AI – Artificial Intelligence
5. LLM – Large Language Model
6. IDBS – Intelligent Database Systems
Table of Contents
Chapter Title Page
No. Number

Acknowledgement i

Abstract ii

List of Abbreviations iii

1 Introduction 1

1.1 Overview 1

1.2 Problem Statement & Objectives 1

1.3 Scope 2

2 Literature 3

2.1 Survey of Existing System/SRS 3

2.2 Limitation of Existing System or Research Gap 3

2.3 Major Project Contribution 3

3 Proposed System 4

3.1 System Description 4

3.2 Architecture/Framework/Block Diagram 4

3.3 Algorithm and Process Design 5

3.4 Detail of Hardware & Software 5

4 Implementation Plan 6

4.1 Gantt Chart (Term I and Term II) 6

5 Implementation Result and Analysis 7

5.1 Implementation Screenshots 9

5.2 Results, Testing, and Analysis 11

6 Financial Expense 12

6.1 Material Expenses 12

6.2 Direct Expenses 12

6.3 Indirect Expenses 12

7 Conclusion and Future Work 13

References 14
CHAPTER NO. 1
INTRODUCTION

1.1 Overview

The content highlights the growing importance of data in today’s digital world and the
challenges people face when interacting with databases. Since accessing data typically
requires knowledge of SQL, many non-technical users struggle to retrieve information, while
even experienced developers may find query writing time-consuming and complex. This
creates a gap between what users want to know and how they must express it in technical
terms.

To address this issue, the concept of Natural Language Interface to Database (NLIDB) systems
is introduced. These systems use AI to convert everyday language into SQL queries, making
data access simpler and more accessible. By bridging the gap between human language and
database queries, such solutions aim to improve efficiency, reduce dependency on technical
teams, and enable more people to make data-driven decisions.

1.2 Problem Statements & Objectives

Problem Statement:

In today’s world, almost everything runs on data. from the apps we scroll through daily to the
decisions businesses make behind the scenes, databases are constantly at work. but actually
interacting with these databases isn’t as simple as it sounds. most of the time, you need to
know sql—a structured query language that can feel overwhelming if you’re not familiar with
it. for non-technical users, it can seem like a completely different language. even for
developers, writing queries—especially complex ones—can take time, effort, and a fair bit of
debugging.

Because of this, there’s a noticeable gap between what someone wants to ask and how they’re
required to ask it. you might clearly know the answer you’re looking for, but expressing that
in proper sql syntax becomes the real challenge. this slows down workflows, creates
dependency on technical teams, and makes data less accessible than it should be.
Objectives:
● Simplify database access using natural language

● Eliminate the need to learn SQL for basic queries

● Bridge the gap between human language and database logic

● Enable non-technical users to retrieve data independently

● Reduce dependency on developers and data teams

● Minimize errors in query writing

● Generate accurate SQL queries automatically

● Improve speed and efficiency of data retrieval

● Make data interaction more user-friendly and intuitive

● Support better and faster data-driven decision making

1.3 Scope

There’s still a lot of room to grow and improve. one obvious next step is handling more
complex queries, such as multi-table joins, nested queries, and advanced filtering. improving
how the chatbot maintains context across multiple queries could also make conversations feel
more natural. Another area of improvement is expanding compatibility with different database
systems. adding support for databases beyond standard sql setups would make the tool more
versatile. Features like query visualization could help users better understand what the
generated sql is doing. similarly, adding explanations for each query could make it a powerful
learning tool. user authentication and personalization could also be introduced to make the
experience more tailored with continuous improvements, this project has the potential to
evolve into a much more powerful and widely usable tool.
CHAPTER NO. 2
LITERATURE SURVEY

2.1 Survey of Existing System

There’s still a lot of room to grow and improve. one obvious next step is handling more
complex queries, such as multi-table joins, nested queries, and advanced filtering. improving
how the chatbot maintains context across multiple queries could also make conversations feel
more natural.
Another area of improvement is expanding compatibility with different database systems.
adding support for databases beyond standard sql setups would make the tool more versatile.
Features like query visualization could help users better understand what the generated sql is
doing. similarly, adding explanations for each query could make it a powerful learning tool.
user authentication and personalization could also be introduced to make the experience more
tailored.
with continuous improvements, this project has the potential to evolve into a much more
powerful and widely usable tool.

2.2 Limitation In Existing System or Research Gap


Existing Natural Language Interface to Database (NLIDB) systems face several
important limitations. They often struggle with complex queries involving multiple
tables, joins, and nested operations, which reduces their effectiveness in real-world
scenarios. These systems also have difficulty understanding ambiguous or vague natural
language, leading to incorrect interpretations of user intent. Additionally, many models
rely heavily on specific training datasets, making them less adaptable to new or dynamic
database schemas. A lack of context awareness further limits their ability to handle
follow-up or conversational queries. In some cases, the generated SQL queries may be
syntactically correct but logically inaccurate. Moreover, challenges such as poor handling
of synonyms and domain-specific terms, limited cross-database compatibility, and
insufficient security measures like access control highlight significant gaps in existing
systems.
2.3 Mini Project Contribution
Meet Meher - front end development
Bhupati nadar- Back end development
Vivaan Nair- Front end development
CHAPTER NO. 3
PROPOSED SYSTEM

3.1 System Description


The proposed AI SQL Chatbot system is designed to simplify database interaction by allowing
users to query data using natural language instead of writing SQL manually. The system
consists of a user-friendly chatbot interface where users can enter their queries in plain
English. This input is processed by a backend system built using FastAPI, which acts as a
bridge between the frontend and the AI model. The core functionality is powered by advanced
language models from Hugging Face, which analyze user input, understand intent, and convert
it into accurate SQL queries based on the database schema.

The system also integrates a structured SQL database where generated queries can be
executed. It dynamically adapts to database schemas, ensuring that the generated queries are
relevant and accurate. Additionally, the chatbot supports real-time responses, making the
interaction fast and efficient. Key features include conversational interaction, automatic SQL
generation, context handling for follow-up queries, and a clean, intuitive user interface
developed using [Link].

Overall, the system works as a middleware layer that connects users to databases in a more
natural way, reducing technical barriers, minimizing errors, and improving accessibility. It is
scalable, efficient, and designed to support both beginners and experienced users in retrieving
data quickly and effectively

3.2 Architecture/Framework /Block Diagram


3.3 Algorithm And Process Design

Step 1: Start
Step 2: User enters query in natural language
Step 3: Capture input through chatbot interface
Step 4: Send the query to backend server (FastAPI)
Step 5: Preprocess the input (cleaning and formatting)
Step 6: Forward the query to AI model (Text-to-SQL)
Step 7: Analyze user intent and extract relevant entities
Step 8: Map extracted data with database schema
Step 9: Generate corresponding SQL query
Step 10: Validate the SQL query (syntax and logic check)
Step 11: If query is incorrect, ask user for clarification
Step 12: If correct, execute query on SQL database
Step 13: Retrieve results from database
Step 14: Convert results into user-friendly format
Step 15: Display SQL query and results to user
Step 16: End

3.2 Details Of Hardware And Software

Hardware Details:

● Processor: Intel i3 or higher


● RAM: Minimum 4 GB (8 GB recommended)
● Storage: At least 10–20 GB free space
● System Type: 64-bit computer/laptop
● Internet Connection: Required for API and AI model access

Software Details:
● Operating System: Windows / Linux / macOS
● Frontend: [Link]
● Backend: FastAPI (Python)
● Programming Language: Python, JavaScript
● AI Platform: Hugging Face (for NLP/Text-to-SQL models)
● Database: MySQL / PostgreSQL / SQLite
● Browser: Google Chrome / any modern web browser
CHAPTER NO. 4
IMPLEMENTATION PLAN
4.1 Gantt Chart

The Gantt chart represents the timeline of the AI SQL Chatbot project over a period of 16
weeks. The project begins with requirement analysis and literature survey to understand the
problem and study existing systems. This is followed by system design and database planning,
where the overall architecture and structure are defined.

The development phase includes frontend development using [Link] and backend
development using FastAPI, which are carried out in parallel to save time. After this,
integration of the AI model with the database and backend is performed to ensure smooth
functioning of the system.

Testing and debugging are conducted to identify and fix errors, followed by performance
optimization to improve efficiency and speed. Documentation is carried out throughout the
project to maintain proper records. In the final stages, presentation preparation is completed,
and the project is deployed for use.

This structured timeline ensures proper planning, efficient task management, and timely
completion of the project.
CHAPTER NO. 5
IMPLEMENTATION RESULT AND ANALYSIS

5.1 Implementation Screenshots


5.2 Results, Testing, and Analysis

\
Results

The AI SQL Chatbot system successfully converts natural language queries into accurate SQL
statements and retrieves relevant results from the database. Users are able to interact with the
system in a conversational manner without requiring prior knowledge of SQL. The chatbot
provides fast responses, improves accessibility to data, and reduces dependency on technical
experts. Overall, the system demonstrates improved efficiency, usability, and effectiveness in
handling real-world data queries.

The system was tested using a variety of natural language queries ranging from simple to
moderately complex. Test cases included basic retrieval queries, conditional queries, and
aggregation-based queries. The chatbot was evaluated based on accuracy, response time, and
correctness of generated SQL queries. Results showed that the system performs well for
simple and moderately complex queries, though minor errors may occur with highly
ambiguous or complex inputs. Continuous testing and refinement helped improve
performance, ensuring reliable and consistent outputs.
CHAPTER NO. 6
FINANCIAL EXPENSE

6.1 Material Expenses

The material expenses for this project are minimal as it is primarily software-based. Costs
may include a computer system, internet connectivity, and optional cloud services or API
usage for AI models. If existing hardware is used, additional expenses are significantly
reduced, making the project cost-effective.

6.2 Direct Expenses

Direct expenses include costs directly related to the development of the project, such as
software tools, hosting services, API subscriptions, and database setup. These expenses are
essential for building, running, and testing the system.

6.3 Indirect Expenses

include electricity consumption, maintenance of hardware, internet usage over time, and
other miscellaneous costs. Although indirect, these expenses contribute to the successful
completion of the project.
CHAPTER NO. 7
CONCLUSION AND FUTURE WORK

The AI SQL Chatbot is a simple idea with a meaningful impact—it makes working with data
feel less technical and more natural. Instead of worrying about writing the perfect SQL
query, users can just focus on what they actually want to know, while the system handles the
complexity in the background. By turning everyday language into database queries, it
removes a major barrier and makes data easier to access for everyone. What makes this
project stand out is not just the technology behind it, but how it improves the overall
experience by making interactions smoother, faster, and less stressful. Whether it’s a student
trying to learn SQL, a professional looking for quick insights, or a developer wanting to save
time, the chatbot adds real value in a practical way. At the same time, building it highlights
the challenges of working with AI, such as understanding user intent, maintaining accuracy,
and ensuring fast responses, all of which require careful design and continuous improvement.
Looking ahead, there is strong potential to expand its capabilities, including handling more
complex queries, supporting multiple database systems, and offering guided data analysis. In
the end, this project is about making powerful technology feel simple and accessible,
showing that tools can be both advanced and easy to use when designed with people in mind.

There’s still a lot of room to grow and improve one obvious next step is handling more
complex queries, such as multi-table joins, nested queries, and advanced filtering. improving
how the chatbot maintains context across multiple queries could also make conversations feel
more [Link] area of improvement is expanding compatibility with different
database systems. adding support for databases beyond standard sql setups would make the
tool more [Link] like query visualization could help users better understand what
the generated sql is doing similarly, adding explanations for each query could make it a
powerful learning too user authentication and personalization could also be introduced to
make the experience more tailored with continuous improvements, this project has the
potential to evolve into a much more powerful and widely usable tool. At the end of the day,
this project is about simplifying something that has traditionally been complex not everyone
wants to learn sql just to access data—and they shouldn’t have to by making database
interaction feel more like a conversation, this chatbot lowers the barrier and makes
technology more inclusive. It also reflects a bigger shift in how we interact with systems
today we’re moving away from rigid commands and toward more natural communication
tools like this are a small step in that direction, showing how ai can make everyday tasks
easier and more accessible. More than anything, this project is a reminder that good
technology isn’t just powerful—it’s easy to use, intuitive, and built with people in mind.
REFERENCE

[1] D. Goswami and A. Chakraborty, "Sensitizing engineers: A brief study of the role of ethics in
engineering education," 2015 5th Nirma University International Conference on Engineering
(NUiCONE), Ahmedabad, India, 2015, pp. 1-4, doi: 10.1109/NUICONE.2015.7449589.
[2] P. S. Joshi and C. V. Sheth, "Modelling of grid tied 3-level diode clamped inverter using space
vector PWM for PV system," 2015 5th Nirma University International Conference on
Engineering (NUiCONE), Ahmedabad, India, 2015, pp. 1-7, doi:
10.1109/NUICONE.2015.7449592.
[3] J. G. Brookshear and D. Brylow, Computer Science: An Overview, 13th ed., London, UK:
Pearson, 2018..
[4] [1]Author Initial. Author Surname, 'Title', Year Published. [Online]. Available: [Link]
URL. [Accessed: 10- Oct- 2013].

You might also like