A sophisticated .NET 9.0 Blazor Server application designed for one-way database synchronization between different database systems.
The Database Converter provides a web-based interface for configuring, scheduling, and monitoring database conversion jobs with advanced features like real-time monitoring, batch processing, and incremental synchronization.
- Multi-Database Support: SQL Server, MySQL, PostgreSQL
- Flexible Synchronization Options:
- Full table conversion
- Incremental synchronization with change detection
- Table and column filtering
- Schema creation and data-only modes
- Advanced Scheduling: Cron-based job scheduling via Hangfire
- Real-time Monitoring: Progress tracking with detailed statistics
- Performance Optimizations: Batch processing, bulk operations, memory management
- Comprehensive Error Handling: Table-level isolation, row-level thresholds, automatic retries
- Docker Support: Ready for containerized deployment
The application follows a clean architecture with clear separation of concerns:
- Core Entities:
SyncJob: Stores job configuration including source/destination connections, table/column mappings, scheduling, and execution trackingSyncJobLog: Records execution history with detailed logs and error messagesAppDbContext: EF Core context with SQLite storage and JSON serialization for complex types
SyncJobService: Manages job CRUD operations, Hangfire integration, and job status managementDatabaseScanService: Handles database schema discovery for multiple database types
SyncJobExecutor: Core synchronization engine that handles the actual data conversion between databases- Supports SQL Server → MySQL/PostgreSQL, MySQL → SQL Server, and PostgreSQL → SQL Server
- Implements different sync modes (full, incremental) with various change detection methods
- Handles batching, error handling, and progress tracking
SyncJobs.razor: Main dashboard showing job status, execution controls, and logsSyncJobDialog.razor: Configuration interface for creating/editing jobs with database scanningLogDetailsDialog.razor: Detailed log viewer
- Pure SQL-based conversion with comprehensive data type mapping
- Support for schema creation and data-only modes
- Table and column level filtering
- Batch processing for large datasets
- Multiple change detection methods:
- Hash-based comparison for balanced performance/accuracy
- Timestamp-based for fastest performance with large datasets
- Full sync with optimized bulk operations for reliability
- Primary key-based merge with deletion detection
- Configurable batch sizes (100-50,000 records)
- Memory management with periodic garbage collection
- Bulk insert operations for improved performance
- Connection pooling and resource management
- Table-level error isolation (continues processing other tables)
- Row-level error handling with configurable thresholds
- Automatic retry logic for transient failures
- Detailed error logging with stack traces
- Cron-based scheduling via Hangfire
- Job status tracking and cancellation
- Automatic registration of existing jobs on startup
- Progress tracking with table/row counts
- Estimated completion time
- Live error reporting
- Background job monitoring without UI blocking
The application is designed for Docker deployment:
- Uses a configurable storage directory for persistent data
- Separate SQLite databases for application data and Hangfire
- Environment-specific configuration support
For detailed Docker deployment instructions, see DOCKER-README.md.
- .NET 9.0 SDK
- Docker (optional, for containerized deployment)
# Clone the repository
git clone https://github.com/yourusername/database-converter.git
cd database-converter
# Build and run the application
dotnet build
dotnet run# Build Docker image
docker build -t database-converter .
# Run with Docker Compose
docker-compose up --build -d- .NET 9.0 - Core framework
- Blazor Server - Web UI framework
- MudBlazor - UI component library
- Entity Framework Core - ORM with SQLite for application data
- Hangfire - Background job scheduling and execution
- Docker - Containerization support
- Testing: Adding automated tests for core functionality
- Security: Implementing encryption for stored database credentials
- Database Support: Expanding to additional database types
- Documentation: Adding more inline code documentation
