面向文档的数据库是否意味着替代关系数据库? [英] Are document-oriented databases meant to replace relational databases?

查看:183
本文介绍了面向文档的数据库是否意味着替代关系数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我一直在使用 MongoDB 工作,我不得不说我真的很喜欢。但是它是一个完全不同类型的数据库,然后我使用。我注意到,对于某些类型的数据,这是最好的选择,但对于大规模的数据库,它可能不是最好的选择。



它可以完全取代你可能拥有的任何关系数据库的地方,在大多数情况下表现更好,这是令人费解的。这导致我提出几个问题:


  1. 面向文档的数据库被开发为下一代数据库,基本上替代关系数据库完全?

  2. 有可能项目会更好地同时使用面向文档的数据库和关系数据库并排的各种数据,更适合一个或另一个? / li>
  3. 如果面向文档的数据库不是要替换关系数据库,那么任何人都有一个数据库结构的例子,它在关系数据库中会更好(反之亦然)。


解决方案


面向文档的数据库下一代数据库,并且基本上完全替代关系数据库?


否。面向文档的数据库(如MongoDB)非常适合我们通常在现代网站(快速查找单个项目或小项目)中查看的任务类型。


$ b $但是他们与关系系统做一些大的折衷。没有像ACID合规性这样的东西,他们将不能替换某些RDBMS。如果你看看MongoDB的系统,缺乏ACID合规是一个很大的原因,它是这么快。


更好地同时使用面向文档的数据库和关系数据库并排使用更适合于一个或另一个的各种数据?


是的。事实上,我正在运行一个非常大的生产网站,使用两者。系统是在MySQL中启动的,但是我们已经将其部分迁移到MongoDB,b / c需要一个Key-Value存储,而MySQL只是在150M的记录中找不到一个项目。


如果面向文档的数据库不是要替换关系数据库,那么任何人都有一个数据库结构的例子,在关系型数据库数据库(反之亦然)?


面向文档的数据库在键值和简单,线性父子关系。



但是,关系数据库在报表等方面仍然有很大的优势, 基于集合。



老实说,我可以看到一个世界,大多数数据是由面向文档的数据库处理的,但是报告是在通过Map-reduce作业更新的关系数据库。


Recently I've been working a little with MongoDB and I have to say I really like it. However it is a completely different type of database then I am used. I've noticed that it is most definitely better for certain types of data, however for heavily normalized databases it might not be the best choice.

It appears to me however that it can completely take the place of just about any relational database you may have and in most cases perform better, which is mind boggling. This leads me to ask a few questions:

  1. Are document-oriented databases being developed to be the next generation of databases and basically replace relational databases completely?
  2. Is it possible that projects would be better off using both a document-oriented database and a relational database side by side for various data which is better suited for one or the other?
  3. If document-oriented databases are not meant to replace relational databases, then does anyone have an example of a database structure which would absolutely be better off in a relational database (or vice-versa)?

解决方案

Are document-oriented databases have been developed to be the next generation of databases and basically replace relational databases completely?

No. Document-oriented databases (like MongoDB) are very good at the type of tasks that we typically see in modern web sites (fast look-ups of individual items or small sets of items).

But they make some big trade-offs with relational systems. Without things like ACID compliance they're not going to be able to replace certain RDBMS. And if you look at systems like MongoDB, the lack of ACID compliance is a big reason it's so fast.

Is it possible that projects would be better off using both a document-oriented database and a relational database side by side for various data which is better suited for one or the other?

Yes. In fact, I'm running a very large production web-site that uses both. The system was started in MySQL, but we've migrated part of it over to MongoDB, b/c we need a Key-Value store and MySQL just isn't very good at finding one item in a 150M records.

If document-oriented databases are not meant to replace relational databases, then does anyone have an example of a database structure which would absolutely be better off in a relational database (or vice-versa)?

Document-oriented databases are great storing data that is easily contained in "key-value" and simple, linear "parent-child" relationships. Simple examples here are things like Blogs and Wikis.

However, relational databases still have a strong leg up on things like reporting, which tends to be "set-based".

Honestly, I can see a world where most data is "handled" by Document-oriented database, but where the reporting is done in a relational database that is updated by Map-reduce jobs.

这篇关于面向文档的数据库是否意味着替代关系数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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