I am building a Text-to-SQL website in next.js that allows users to generate SQL queries in various dialects (Standard SQL, PostgreSQL, MS SQL, MariaDB, Snowflake, BigQuery, SQLite, Hive, Spark SQL, Redshift) using natural language prompts. The website will have the following features:
Text-to-SQL Conversion:
Users can input a natural language prompt, and the system will generate the corresponding SQL query in the selected dialect.
Database Connectivity:
Users can connect to their own databases (e.g., PostgreSQL, MySQL, SQLite) to fetch table schemas and execute queries directly.
Query Generation Modes:
Prompt Mode: Generate SQL queries directly from natural language prompts.
Schema Mode: Users can insert table schemas (one or more) and ask for queries based on the schema in natural language.
Connected Database Mode: Fetch table schemas from the connected database and generate queries dynamically.
Supported SQL Dialects:
The system will support multiple SQL dialects, including Standard SQL, PostgreSQL, MS SQL, MariaDB, Snowflake, BigQuery, SQLite, Hive, Spark SQL, and Redshift.
User Interface:
A clean and intuitive UI built with Next.js for seamless user interaction.
Options to select SQL dialects, input natural language prompts, and connect to databases.