在开发Web应用程序时,您将使用Graph数据库还是Document数据库? [英] When developing web applications when would you use a Graph database versus a Document database?

查看:167
本文介绍了在开发Web应用程序时,您将使用Graph数据库还是Document数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Rails开发基于Web的应用程序。我在使用图形数据库(如InfoGrid)或文档数据库(如MongoDB)之间进行辩论。



我的应用程序需要存储两组小数据作为URL,以及非常大的数据集,例如虚拟机。这些数据将绑定到单个用户。



我有兴趣了解人们使用图形或文档数据库的经验,以及为什么他们将使用任一选项。 / p>

谢谢

解决方案

世界,以正确和完全回答你的问题,但我使用文档数据库一段时间,这里有一些个人提示。



文档数据库基于一个概念



他们不概念化文档之间的关系。



因此,如果您的软件必须提供高级的查询,其中选择标准作用于几种'文档类型',或者如果您只需要执行一个选择使用几个元素,[key,value]概念是不合适的。



还有一些其他情况下文档数据库不合适:在分页表中呈现大型数据集,可在多个列上排序是其中性能



因此在许多情况下,您必须执行服务器端处理才能选择和rails,或任何其他ruby的框架,你可能会遇到性能问题。



图表数据库基于tripplestore的概念,这意味着它们也概念化了实体之间的关系。



可以使用关系(和实体角色)遍历图形,在跨关系结构数据执行搜索时可能更方便。



由于我没有图形数据库的经验,我不知道图形数据库是否可以很容易地查询/遍历与几个标准,但如果一个建议的读者有这样的信息,我真的很感激这些查询/遍历的任何示例。



我目前正在阅读关于InfoGrid,并试图确定这样的数据库可以方便地执行复杂的请求在一个非常大



从我可以读取的信息,InfoGrah应该被认为是一个数据联合者,能够搜索/挖掘数据



这意味着您可以 使用mongo存储来更新和用于数据搜索的InfoGraph和可能在nosql数据库中进行复杂搜索时会占用很多cpu和磁盘。



可能看起来有点overkill,如果你的应用程序只是存储一个巨大的二进制文件在数据库中,所有你需要的是执行简单的键查询和检索结果。



希望其中的一些帮助;)


在这种情况下,nosql数据库如mongo或couch可能会很方便。

I am developing a web-based application using Rails. I am debating between using a Graph Database, such as InfoGrid, or a Document Database, such as MongoDB.

My application will need to store both small sets of data, such as a URL, and very large sets of data, such as Virtual Machines. This data will be tied to a single user.

I am interested in learning about peoples experiences with either Graph or Document databases and why they would use either of the options.

Thank you

解决方案

I don't feel enough experienced with both worlds to properly and fully answer your question, however I'm using a document database for some time and here are some personal hints.

The document databases are based on a concept of key,value, and static views and are pretty cool for finding a set of documents that have a particular value.

They don't conceptualize the relations between documents.

So if your software have to provide advanced "queries" where selection criteria act on several 'types of document' or if you simply need to perform a selection using several elements, the [key,value] concept is not appropriate.

There are also a number of other cases where document databases are inappropriate : presenting large datasets in "paged" tables, sortable on several columns is one of the cases where the performances are low and disk space usage is huge.

So in many cases you'll have to perform "server side" processing in order to pick up the pieces, and with rails, or any other ruby based framework, you might run into performance issues.

The graph database are based on the concept of tripplestore, meaning that they also conceptualize the relations between the entities.

The graph can be traversed using the relations (and entity roles), and might be more convenient when performing searches across relation-structured data.

As I have no experience with graph database, I'm not aware if the graph database can be easily queried/traversed with several criterias, however if an advised reader has such an information I'd really appreciate any examples of such queries/traversals.

I'm currently reading about InfoGrid and trying to figure if such databases could by handy in order to perform complex requests on a very large set of data, relations included ....

From what I can read, the InfoGrah should be considered as a "data federator" able to search/mine the data from several sources (Stores) wich can also be a NoSQL database such as Mongo.

Wich means that you could use a mongo store for updates and InfoGraph for data searching, and maybe spare a lot of cpu and disk when it comes to complex searches inside a nosql database.

Of course it might seem a little "overkill" if your app simply stores a large set of huge binary files in a database and all you need is to perform simple key queries and to retrieve the result. In that cas a nosql database such as mongo or couch would probably be handy.

Hope some of this helps ;)

这篇关于在开发Web应用程序时,您将使用Graph数据库还是Document数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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