Skip to content

AryaChavan838181/NoSQL2SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

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

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors