Skip to content

alexxonline/datamaster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DataMaster

DataMaster Screenshot

A web application for comparing Oracle database schemas and data between two databases — a Read DB and a Write DB.

Features

  • Schema Diff — side-by-side comparison of database objects (tables, views, triggers, procedures, sequences), including column-level diffs with type and nullability details.
  • Data Diff — row-level comparison of table data between both databases, with support for large tables (up to 5,000 rows fetched, 200 diff rows returned per side).
  • SQL Scripts — generate DDL definitions and INSERT statements from the Read database for any object.
  • Configuration — view the connection details for both databases.

Tech Stack

Layer Technology
Backend Python · FastAPI · SQLAlchemy · oracledb
Frontend Preact · Vite · TypeScript
Database Oracle (tested with Oracle XE)

Project Structure

backend/       FastAPI app (uvicorn)
dm-front/      Preact + Vite frontend
.env           Database connection strings (not committed)

Setup

1. Environment

Copy .env.sample to .env and fill in your Oracle connection strings:

READ_DB=oracle+oracledb://user:pass@host:1521/?service_name=XEPDB1
WRITE_DB=oracle+oracledb://user:pass@host:1521/?service_name=XEPDB1

WSL2 note: If the backend runs inside WSL2 and Oracle is on the Windows host, use the WSL2 gateway IP (ip route show default) instead of localhost.

2. Backend

python -m venv .venv
source .venv/bin/activate
pip install -r backend/requirements.txt

cd backend
uvicorn app.main:app --reload

3. Frontend

cd dm-front
npm install
npm run dev

Vite proxies /api requests to http://localhost:8000.

API Endpoints

Method Path Description
GET /api/schema/diff Full schema diff between both DBs
GET /api/schema/table-columns/{table_name} Column-level diff for a specific table
GET /api/data/tables All tables with comparison status
GET /api/data/row-diff/{table_name} Row-level diff for a table (10s timeout)
GET /api/sql/objects List all objects in the Read DB
GET /api/sql/ddl/{object_type}/{object_name} DDL for an object
GET /api/sql/inserts/{table_name} Generated INSERT statements
GET /api/config Database connection info

About

A data comparer and sql script generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors