Skip to content

We have made an application which takes connection string of postgreSQL, schema name and access path file as input and can get mongoDB collections as an output provided by the connection string of MongoDB atlas in mongoDB compass.

License

Notifications You must be signed in to change notification settings

njshah301/SQL-to-No-SQL-migration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Core Idea:

In this project, we have made an application which takes name and access path as input and can get mongoDB collections as an atlas in mongoDB compass. The algorithm can extract all the needed schema information such as fetch tables, primary key, referred table,reference table etc for given schema. After schema extraction, algorithm will embed or the bases of set of rules. After migration completed, collections are populated in mongoDB compass.

Getting Started

Download Docker Desktop for Mac or Windows. Docker Compose will be automatically installed. On Linux, make sure you have the latest version of Compose.

Run in this directory to build and run the app:

docker-compose up

or if you want to run an image directly you can follow below commands:

To pull image:

docker pull njshah301/migration_from_sql_to_nosql:0.0.1

To build image:

docker build -t njshah301/migration_from_sql_to_nosql:0.0.1 .

To run image:

docker container run -d -p  27010:27010 njshah301/migration_from_sql_to_nosql:0.0.1

The Migration app will be running at http://localhost:27010.

Requirements:

1> PostGreSQL

2> MongoDB Compass

How it Works ?

Example Database [BasketBall Training Manangement System]

image

We have 17 table in SQL Schema.

Schema Diagram

image

HomePage of the Application:

image

MongoDB Compass View:

image

Input Parameters:

image

Note: Access path is a text file, which is given to the input to prioritized some collections which are frequently queried out. The migration Algorithm takes care about these acess paths.

Example of Acesss path for our BasketBall Training Management System:

image

Processing of the Algorithm

image

Migration Done Sucessfully

image

Now, if we see in the MongoDB compass, Database (Sports_Training_Demo) is created automatically and migration has been done.

Results:

Database Created Sucessfully

image

Migration has been Done

image

Note: As you can see that, in SQL we have 17 tables and in MongoDB we got 7 collections. Thus, Denormalization has been performed.

Player Collection View

image

This project was done as the Summer Research Internship.

About

We have made an application which takes connection string of postgreSQL, schema name and access path file as input and can get mongoDB collections as an output provided by the connection string of MongoDB atlas in mongoDB compass.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published