Spaces:
Sleeping
Sleeping
Commit ·
7f347eb
1
Parent(s): a3e67db
Resolve merge conflict in README.md
Browse files
README.md
CHANGED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<iframe width="560" height="315" src="https://www.youtube.com/embed/0kAYAxU7YsQ?si=6ENuemAOXeLNyh-I" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
# 🤖 AI Database Query Assistant
|
| 6 |
+
|
| 7 |
+
A powerful AI-powered database query assistant that allows you to interact with your MySQL database using natural language.
|
| 8 |
+
|
| 9 |
+
## 🏷️ Tags
|
| 10 |
+
- agent-demo-track
|
| 11 |
+
|
| 12 |
+
## ✨ Features
|
| 13 |
+
|
| 14 |
+
### Database Connection
|
| 15 |
+
- Secure MySQL database connection with support for:
|
| 16 |
+
- Custom host and port configuration
|
| 17 |
+
- Username and password authentication
|
| 18 |
+
- Special character support in passwords
|
| 19 |
+
- Default port (3306) handling
|
| 20 |
+
- Connection status monitoring
|
| 21 |
+
|
| 22 |
+
### AI-Powered Query Processing
|
| 23 |
+
- Natural language to SQL conversion using Google's Gemini model
|
| 24 |
+
- Intelligent query validation and error handling
|
| 25 |
+
- Automatic query correction and optimization
|
| 26 |
+
- Support for complex SQL operations including:
|
| 27 |
+
- Joins
|
| 28 |
+
- Aggregations
|
| 29 |
+
- Subqueries
|
| 30 |
+
- Complex functions
|
| 31 |
+
|
| 32 |
+
### Database Analysis
|
| 33 |
+
- Comprehensive database structure analysis
|
| 34 |
+
- Table schema visualization
|
| 35 |
+
- Column information display
|
| 36 |
+
- Primary and foreign key relationship mapping
|
| 37 |
+
- Row count statistics
|
| 38 |
+
|
| 39 |
+
### Query Features
|
| 40 |
+
- Natural language question processing
|
| 41 |
+
- SQL query generation and execution
|
| 42 |
+
- Query performance metrics:
|
| 43 |
+
- Execution time tracking
|
| 44 |
+
- Row count statistics
|
| 45 |
+
- Query complexity analysis
|
| 46 |
+
- Performance insights
|
| 47 |
+
|
| 48 |
+
### Query History
|
| 49 |
+
- Track and store query history
|
| 50 |
+
- View past queries with:
|
| 51 |
+
- Timestamp
|
| 52 |
+
- Original question
|
| 53 |
+
- Generated SQL
|
| 54 |
+
- Execution metrics
|
| 55 |
+
- Complexity level
|
| 56 |
+
- Reuse previous queries
|
| 57 |
+
- Clear history functionality
|
| 58 |
+
|
| 59 |
+
### Security Features
|
| 60 |
+
- Secure password handling
|
| 61 |
+
- SQL injection prevention
|
| 62 |
+
- Query validation
|
| 63 |
+
- API key management:
|
| 64 |
+
- Environment variable support
|
| 65 |
+
- User-provided key option
|
| 66 |
+
- Secure key storage
|
| 67 |
+
|
| 68 |
+
### User Interface
|
| 69 |
+
- Modern Gradio-based interface
|
| 70 |
+
- Tabbed navigation
|
| 71 |
+
- Real-time status updates
|
| 72 |
+
- Interactive query input
|
| 73 |
+
- Formatted result display
|
| 74 |
+
- Example questions for guidance
|
| 75 |
+
|
| 76 |
+
### Performance Monitoring
|
| 77 |
+
- Query execution time tracking
|
| 78 |
+
- Complexity analysis
|
| 79 |
+
- Performance insights
|
| 80 |
+
- Resource usage optimization
|
| 81 |
+
|
| 82 |
+
### Error Handling
|
| 83 |
+
- Comprehensive error detection
|
| 84 |
+
- User-friendly error messages
|
| 85 |
+
- Automatic query correction
|
| 86 |
+
- Detailed error reporting
|
| 87 |
+
|
| 88 |
+
## 🚀 Getting Started
|
| 89 |
+
|
| 90 |
+
1. Install the required dependencies
|
| 91 |
+
2. Set up your Google API key (for Gemini model)
|
| 92 |
+
3. Configure your MySQL database connection
|
| 93 |
+
4. Launch the application
|
| 94 |
+
5. Start querying your database using natural language!
|
| 95 |
+
|
| 96 |
+
## 🔧 Requirements
|
| 97 |
+
|
| 98 |
+
- Python 3.x
|
| 99 |
+
- MySQL database
|
| 100 |
+
- Google API key for Gemini model
|
| 101 |
+
- Required Python packages (see requirements.txt)
|
| 102 |
+
|
| 103 |
+
## 📝 License
|
| 104 |
+
|
| 105 |
+
This project is licensed under the MIT License - see the LICENSE file for details.
|