为什么我应该使用基于文档的数据库而不是关系数据库? [英] Why should I use document based database instead of relational database?

查看:156
本文介绍了为什么我应该使用基于文档的数据库而不是关系数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么要使用基于文档的数据库,如CouchDB,而不是使用关系数据库。
是否有任何典型的应用程序或域,其中基于文档的数据库比关系数据库更合适?

Why should I use document based database like CouchDB instead of using relational database. Are there any typical kinds of applications or domains where the document based database is more suitable than the relational database?

推荐答案

可能你不应该: - )

Probably you shouldn't :-)

第二个最明显的答案是你应该使用它,如果你的数据不是关系。这通常表现在没有简单的方法来描述您的数据作为一组列。一个很好的例子是一个数据库,你实际存储纸质文档,例如。通过扫描办公室邮件。数据是扫描的PDF,并且您有一些总是存在的元数据(按文档类型扫描,扫描,以及许多可能存在的元数据字段(客户编号,供应商编号,订单编号, OCRed全文等)。通常,您不知道将在未来两年内添加哪些元数据字段。
像关系数据库一样,CouchDB的工作方式比那种类型的数据更好。

The second most obvious answer is you should use it if your data isn't relational. This usually manifests itself in having no easy way to describe your data as a set of columns. A good example is a database where you actually store paper documents, e.g. by scanning office mail. The data is the scanned PDF and you have some meta data which always exists (scanned at, scanned by, type of document) and lots of possible metadata fields which exists sometime (customer number, supplier number, order number, keep on file until, OCRed fulltext, etc). Usually you do not know in advance which metadata fields you will add within the next two years. Things like CouchDB work much nicer for that kind of data than relational databases.

我也喜欢这样的事实,我不需要任何客户端库CouchDB除了HTTP客户端,现在几乎包括在几乎每种编程语言。

I also personally love the fact that I don't need any client libraries for CouchDB except an HTTP client, which is nowadays included in nearly every programming language.

可能最不明显的答案:如果你觉得没有使用RDBMS的痛苦,留在它。

The probably least obvious answer: If you feel no pain using a RDBMS, stay with it. If you always have to work around your RDBMS to get your job done, a document oriented database might be worth a look.

对于一个更复杂的列表检查

For a more elaborate list check this posting of Richard Jones.

这篇关于为什么我应该使用基于文档的数据库而不是关系数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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