This is a demo of the MongoDB Relational Migrator a free product that helps migrating from a RDBMS to MongoDB.
To run this demo you need to have Docker installed. Once Docker Desktop is running, you can write in a terminal:
git clone https://github.com/mongodb-developer/relational-migrator-demo
cd relational-migrator-demo
docker compose up
This will start 5 containers:
- an empty PostgreSQL container
- once this has been launched, will launch a container to import a database in PostgreSQL
- finally, an instance of pgadmin an admin web-based tool for PostgreSQL, mainly to check there's data in there
- at the same time, a MongoDB community Docker container will be started
- once that has been launched, another container will create a Database called
dvds
- you can access pgadmin at https://localhost:8080, (user:
sql@mongodb.com
, password=password
) to show there's actually some data in that PostgreSQL DB. The connection to the PostgreSQL server is already configured. - once shown, access to MongoDB using MongoDB Compass to show the dvds Database, it should be empty. To connect to this MongoDB instance use this connection string:
mongodb://dvds:password@localhost:27017/dvds
- To connect directly to PostgreSQL from Relational Migrator and do the import, use this connection string:
postgres://postgres:password@postgresql:5432/postgres
- now run the Relational Migrator and import data into PostgreSQL!
Just run the provided script ./clean-containers.sh
. This will clean all data that you imported into MongoDB
The dvdrental.zip
has been downloaded from PostgreSQL Sample Database