databasejakarta-eenosqlrelational-databasejava-ee-6

Migrate data from relational DB to NoSQL


Is it possible/are there tools/ best practices etc to migrate data to a NoSQL format from a relational DB.

I have a JEE6 app making use of Hibernate ORM to persist to MySQL but now we wish to move to NoSQL solution but need to bring the existing data with us

Thanks W


Solution

  • There are some tools to help the migration, but in the end, MySQL is a relational database which has a completely different structure from noSQL databases.

    In the end, you will almost always have to do these four steps stated in this article (refers to mongoDB, and you didn't specify, but it applies to any):

    1. Get to know MongoDB. Download it, read the tutorials, try some toy projects.

    2. Think about how to represent your model in its document store.

    3. Migrate the data from the database to MongoDB, probably simply by writing a bunch of SELECT * FROM statements against the database and then loading the data into your MongoDB model using the language of your choice.

    4. Rewrite your application code to query MongoDB through statements such as insert() or find().