Migrating data from a relational database to NoSQL

Is it possible / have tools / best practices, etc., to transfer data to NoSQL format from a relational database.

I have a JEE6 application using Hibernate ORM to support MySQL, but now we want to move on to the NoSQL solution, but we need to bring the existing data to us

Thanks w

+5
source share
5 answers

There are some tools that help porting, but MySQL is, after all, a relational database that has a completely different structure from noSQL databases.

In the end, you will almost always have to follow these four steps mentioned in this article (applies to mongoDB, and you do not specify, but this applies to any):

1. Check out MongoDB. Download it, read tutorials, try some toy projects.

2. Think about how to present your model in the repository of your documents.

3. Transferring data from the database to MongoDB, perhaps simply by writing a group of SELECT * FROM on the database and then load the data into your MongoDB model using the language of your choice.

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

+6
source

To simplify things a bit, an Oracle database could fully master what is stored in the database. Oracle or any RDBMS will do this by maintaining relationships between pieces of data stored in tables.

A document-based database, on the other hand, stores mainly how data is consumed in the system. He accomplishes this using Key-Value pairs, with keys playing a specific key variable inside.

This will depend on the complexity of the portable system, the volumes, functionality offered, etc. Although there are several ways to migrate from a DBMS to a json-based database, the standard approach involves creating ideas about existing SQL DBs and migrating in stages.

Of course, the main process of such migration is to start by redesigning the circuit as a first step . In a document structure, such as Mongo JSON or BSON, most of the parent's child relationships can be placed in a single structure (or document). For example, Person_ID, Car_Ownership_ID can be combined to create a single json document listing all car owners.

The process of designing a sound scheme will be stored in specific targets, as well as denormalizing a fully normalized database in the DBMS. As a good second step, most JOINs need to be combined into bound collections to facilitate access with exceptions to certain external joins.

Once the schema is ready, you can use the ETL process or replace the script to retrieve, convert, and load the new schema with data replica in the RDBMS.

+1
source

Data Transfer to NoSQL. In my opinion, MongoDB is a good choice. There is a Tapdata Replicator tool that can replicate MySQL, Oracle, SQLServer to MongoDB. This allows you to set up the source database and the target database, and then map the data from source to target. You can install a new data model in MongoDB without any codes. For example, in the original MySQL database of 20 tables, you can design the data scheme in MongoDB, integrate into 3 or 5 collections. You can also select 1: 1 Clone.

+1
source

I made the M110JS "MongoDB for the Node.js Developers Course" from Mongo University https://university.mongodb.com/ and can fully recommend it (it is also free).

It covers (I think only in one of its weeks) the differences between SQL and NOSQL, for example, when not using foreign keys, but rather embedding documents, risks of duplicates, etc. and how to handle them.

It only starts up so often, so this is just a long-term approach.

0
source

I got an answer and found a useful link below, try once

Useful video link can help you

0
source

Source: https://habr.com/ru/post/1493170/


All Articles