将数据从关系数据库迁移到 NoSQL [英] Migrate data from relational DB to NoSQL

查看:23
本文介绍了将数据从关系数据库迁移到 NoSQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能/是否有工具/最佳实践等将数据从关系数据库迁移到 NoSQL 格式.

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

我有一个 JEE6 应用程序使用 Hibernate ORM 持久保存到 MySQL,但现在我们希望迁移到 NoSQL 解决方案,但需要随身携带现有数据

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

谢谢W

推荐答案

有一些工具可以帮助迁移,但归根结底,MySQL 是一个关系型数据库,其结构与 noSQL 数据库完全不同.

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.

最后,您几乎总是必须执行 这篇文章(指的是mongoDB,你没有指定,但适用于任何一个):

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. 了解 MongoDB.下载它,阅读教程,尝试一些玩具项目.

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

2.考虑如何在其文档存储中表示您的模型.

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

3. 将数据从数据库迁移到 MongoDB,可能只需针对数据库编写一堆 SELECT * FROM 语句,然后然后使用以下语言将数据加载到您的 MongoDB 模型中你的选择.

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. 重写您的应用程序代码以通过 insert() 或 find() 等语句查询 MongoDB.

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

这篇关于将数据从关系数据库迁移到 NoSQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆