Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NoSQL2SQL - Enhanced Edition

Overview

NoSQL2SQL is an database migration tool that seamlessly converts NoSQL databases to SQL format with intelligent schema analysis, visualization, and conversational assistance.

🚀 Key Features

Core Migration

  • Multi-Database Support: Redis, CouchDB, Cassandra and Neo4j to MySQL
  • Intelligent Schema Analysis: Automatic pattern recognition and type inference
  • Data Preservation: Maintains data integrity during migration
  • Relationship Detection: Identifies implicit relationships in NoSQL data

AI-Powered Enhancements

  • MCP Integration: Model Context Protocol with Gemini 2.0 Flash for Neo4j migration
  • AI Recommendations: Automatic relationship suggestions with confidence scores
  • Conversational Assistant: Resizable chat sidebar (Claude-style) for migration guidance
  • Schema Optimization: AI-powered data type and index recommendations
  • MCP Servers: Dedicated Model Context Protocol servers for Redis, CouchDB, and Neo4j

Visual & UX

  • Dark/Light Theme: Auto-syncs with Windows system theme
  • Interactive Visualization: dbdiagram.io-style ERD with zoom/pan
  • Animated UI: Apple-style toggle switches with smooth transitions
  • Real-time Progress: Live migration status and logging

Security & Settings

  • Encrypted Storage: API keys and passwords stored securely
  • Persistent Configuration: Settings preserved across sessions
  • Flexible Options: Toggle features on/off as needed

📋 Supported Conversions

Source Database Target Database Status
Redis MySQL ✅ Full Support
CouchDB MySQL ✅ Full Support
Cassandra MySQL ✅ Full Support
Neo4j MySQL ✅ Full Support (with MCP)

🎯 Quick Start

Prerequisites

  • Python 3.7 or higher
  • MySQL Server (5.7+)
  • Source database (Redis/CouchDB/Neo4j) running
  • (Optional) Gemini API key for AI features

Installation

  1. Clone the repository:

    git clone https://github.com/AryaChavan838181/SY_SEM_3_DBMS_CP_NoSQL2SQL.git
    cd SY_SEM_3_DBMS_CP_NoSQL2SQL
  2. Install dependencies:

    pip install -r requirements.txt
  3. Run the application:

    Windows:

    start.bat

    Or manually:

    python gui_converter.py

First-Time Setup

  1. Configure Settings (File → Settings)

    • Choose your theme (Auto/Light/Dark)
    • (Optional) Enable MCP and enter Gemini API key
    • (Optional) Configure database passwords
  2. Run a Migration

    • Select source database (Redis/CouchDB/Neo4j)
    • Enter MySQL credentials
    • Test connection
    • Validate database name
    • (Optional) Get AI recommendations
    • (Optional) Customize schema
    • Start migration
    • Visualize results

🤖 AI Features (Optional)

Enable MCP Integration

  1. Get a free Gemini API key: Google AI Studio
  2. Open Settings (File → Settings)
  3. Go to "AI & MCP" tab
  4. Toggle "Enable MCP" ON
  5. Enter your API key
  6. Enable "AI Recommendations"
  7. Save

Using AI Features

  • AI Recommendations: Analyzes schema and suggests relationships
  • Chat Sidebar: Toggle with Ctrl+B or View → Toggle Chat Sidebar
  • Ask Questions: Get migration strategies and schema advice
  • Schema Optimization: Get suggestions for better data types
  • Natural Language Queries: Interact conversationally
  • Quick Actions: Pre-configured prompts for common tasks

⌨️ Keyboard Shortcuts

Shortcut Action
Ctrl+B Toggle AI Chat Sidebar

📊 Visualization

After migration, use the Schema Visualizer to:

  • View interactive ERD diagrams
  • Explore table relationships
  • Zoom and pan the canvas
  • Export diagrams as images
  • Switch between layout modes (Auto/Grid/Circular)

Access: Tools → Schema Visualizer or click Visualize button

🎨 Theme Customization

The app automatically matches your Windows system theme:

  • Auto Mode: Follows Windows dark/light theme
  • Manual Override: Choose Light or Dark manually
  • Persistent: Theme choice saved across sessions

Toggle: View → Toggle Theme or File → Settings → Appearance

🔧 Configuration

Settings are stored in: C:\Users\[YourName]\.nosql2sql\

  • settings.json: General preferences
  • secure.enc: Encrypted sensitive data (API keys, passwords)
  • .key: Machine-specific encryption key (hidden)

📁 Project Structure

NoSQL2SQL/
├── gui_converter.py           # Main application (ENHANCED)
├── config_manager.py          # Settings & encryption (NEW)
├── theme_manager.py           # Theme system (NEW)
├── mcp_manager.py             # AI & MCP integration (NEW)
├── schema_visualizer.py       # ERD visualization (NEW)
├── chat_interface.py          # AI chat sidebar (NEW)
├── settings_panel.py          # Settings UI (NEW)
├── animated_toggle.py         # UI components (NEW)
├── redis2mysql.py             # Redis converter
├── sqlbuilder.py              # SQL schema builder
├── redis_schema_analyzer.py   # Redis analyzer
├── couchdb_converter/         # CouchDB modules
│   ├── couchdb2mysql.py
│   └── couchdb_schema_analyzer.py
├── neo4j_converter/           # Neo4j modules (NEW)
│   ├── neo4j2mysql.py
│   └── neo4j_schema_analyzer.py
├── mcp_servers/               # MCP servers (NEW)
│   ├── mcp_neo4j.py           # Neo4j MCP server
│   ├── mcp_redis.py           # Redis MCP server
│   └── mcp_couchdb.py         # CouchDB MCP server
├── requirements.txt           # Dependencies (UPDATED)
└── start.bat                  # Windows launcher (NEW)

🎓 Academic Context

  • Course: Database Management Systems (DBMS)
  • Semester: 3rd Semester
  • Type: Course Project (CP)
  • Focus: NoSQL to SQL migration with AI enhancement

� Novel Features

This project introduces several innovations:

  1. Frequency-Based Schema Inference: Statistical analysis for optimal schema
  2. Dynamic Document Mapping: Universal pattern recognition
  3. Threshold-Based Normalization: Smart flattening decisions
  4. AI-Powered Recommendations: Gemini 2.0 Flash integration
  5. MCP Protocol Support: Conversational database operations
  6. Cross-Platform Theme Sync: OS-aware theming
  7. Encrypted Configuration: Secure credential storage

See NOVEL_FEATURES.md for technical details.

� Documentation

  • README.md - This file
  • NOVEL_FEATURES.md - Technical innovations
  • REDIS_IMPLEMENTATION_DOCUMENTATION.md - Redis implementation details
  • Comments in source code - Inline documentation

🐛 Troubleshooting

Common Issues

MCP won't start:

  • Check your Gemini API key in settings
  • Verify internet connection
  • Check API quota at Google AI Studio

Theme not applying:

  • Restart the application
  • Try manual theme selection in settings

Migration fails:

  • Verify source database is running
  • Check database credentials
  • Ensure sufficient permissions
  • Review migration log for details

Visualization not working:

  • Run a migration first to generate schema
  • Enable visualization in settings
  • Check that migration completed successfully

Database-Specific

Redis:

  • Ensure Redis server is running: redis-server
  • Test with: redis-cli ping
  • Default port: 6379

CouchDB:

Neo4j:

  • Ensure Neo4j is running
  • Default bolt port: 7687
  • Configure password in settings

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages