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 converts natural-language questions into executable SQL queries against a given database schema, allowing non-technical users to query data without writing SQL. It includes schema-aware prompting, query validation, and safe execution with read-only sandboxing.
Problem Statement
Business users often need specific data insights but lack SQL skills, creating a dependency bottleneck on data analysts for simple queries. A natural-language-to-SQL interface removes this bottleneck by letting anyone query the database directly in plain English.
Objectives
Build a schema introspection module to feed table/column context to the LLM
Implement natural-language-to-SQL generation with schema-aware prompting
Add query validation to catch syntax errors and unsafe operations before execution
Build a read-only sandboxed execution environment with result visualization
Allow users to refine queries through follow-up natural-language corrections
Modules
Schema Introspection
Extracts table names, columns, data types, and foreign-key relationships to build schema context for prompting.
NL-to-SQL Generation
Uses an LLM with schema-aware few-shot prompting to translate the user's question into a candidate SQL query.
Query Validation & Safety Layer
Parses the generated SQL to block destructive operations (DROP/DELETE/UPDATE) and validates syntax before execution.
Sandboxed Execution
Runs the validated query against a read-only database replica and returns results as a table.
Result Visualization & Refinement
Displays query results as charts/tables and lets users ask follow-up corrections like 'now filter by last month'.
Expected Output
A web tool where non-technical users type questions in plain English and receive both the generated SQL query and the resulting data table/chart, running safely against a read-only database copy.
Future Scope
The tool can be extended to support multi-table joins inferred automatically from vague queries and natural-language dashboard creation.