当前位置:   article > 正文

mysql to mongodb,将数据库从mysql转换为mongoDb

java mysql 切换 mongodb

is there any easy way to change the database from mysql to mongoDB ?

or better any one suggest me good tutorial do it

解决方案is there any easy way to change the database from mysql to mongoDB ?

Method #1: export from MySQL in a CSV format and then use the mongoimport tool. However, this does not always work well in terms of handling dates of binary data.

Method #2: script the transfer in your language of choice. Basically you write a program that reads everything from MySQL one element at a time and then inserts it into MongoDB.

Method #2 is better than #1, but it is still not adequate.

MongoDB uses collections instead of tables. MongoDB does not support joins. In every database I've seen, this means that your data structure in MongoDB is different from the structure in MySQL.

Because of this, there is no "universal tool" for porting SQL to MongoDB. Your data will need to be transformed before it reaches MongoDB.

本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/675623
推荐阅读
相关标签
  

闽ICP备14008679号