Migrate mongodb to mysql?

since google is not very useful here:

What is the best way to migrate mongodb database to mysql database? any examples of best practices?

thanks!

+4
source share
3 answers

After you completed the pliability exercise and got an idea of ​​the mappings, I would look at mongoexport - you have to be careful but you will also have to import CSV / TSV into MySQL in a reasonable way.

Another option, especially if you are faced with input problems, is to simply pull out all your data programmatically using your language and the selected driver and paste it directly into MySQL again using your favorite driver - this gives you maximum control, but also and the biggest job.

+6
source

It may not be a little starter, because people usually implement things in Mongo or other NoSQL databases to have a schematic design. This is diametrically opposed to the concept of a relational database.

Without looking at the data structures that you have in Mongo, it is impossible to answer.

+3
source

@Tronic I would start by using the mappings that MongoDB provides on its website:

Mapping Guide

Then I tried to take your documents in each of your collections and try to break them into the corresponding database entities (tables). Entities / attributes can be difficult to design based on Mongo's schematic design (as @Mike Brant points out)

Hope this helps.

- S

+3
source

All Articles