Get Free Synopsis PDF
We will prepare a detailed synopsis for your college submission. Includes problem statement, objectives, DFD, ER diagram, and more.
This project builds a question-answering system that lets users query a structured relational database using plain natural-language questions instead of SQL. A fine-tuned text-to-SQL transformer model translates the natural-language question into an executable SQL query against the target schema, which is then run to retrieve and display the answer. A React-based chat-style interface shows both the generated query and the resulting answer for transparency.
Problem Statement
Non-technical business users often need insights from structured databases but lack the SQL skills to write queries themselves, creating a dependency on technical staff for routine data lookups. A natural-language-to-SQL interface removes this bottleneck by letting users ask questions directly in plain language.
Objectives
Prepare a labeled dataset of natural-language questions paired with SQL queries
Fine-tune a text-to-SQL transformer model on the target database schema
Implement query execution and result formatting against a MySQL database
Build a chat-style interface showing the generated query and answer
Evaluate query-generation accuracy using exact-match and execution-match metrics
Modules
Schema Preparation Module
Documents the target MySQL database schema and sample question-SQL pairs for model fine-tuning.
Text-to-SQL Model Module
Fine-tunes a transformer model to translate natural-language questions into SQL queries for the given schema.
Query Execution Module
Executes the generated SQL query against the database and retrieves the result set.
Chat Interface Module
Displays the user's question, the generated SQL query, and the formatted answer in a conversational UI.
Evaluation Module
Measures query-generation accuracy using exact-match and execution-match comparison against ground-truth queries.
Expected Output
The system translates natural-language questions into executable SQL queries and returns accurate answers for a defined database schema, measured through execution-match accuracy. It demonstrates a practical approach to democratizing data access for non-technical users.
Future Scope
Future work includes extending support to multi-table joins and aggregations with greater complexity, and generalizing the model to work across multiple database schemas without retraining.