一起使用MongoDB和Neo4j [英] Using MongoDB and Neo4j together

查看:1260
本文介绍了一起使用MongoDB和Neo4j的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开始一个新项目,我正在考虑使用MongoDB作为文档存储工具,并使用Neo4j作为映射文档之间关系的机制,然后我想通过rest API公开查询的结果. 有人会说这样做的利弊是什么? 是否有其他更好的方法可以使用不同的NoSQL文档存储来实现这一目标? 有没有人可以在网上找到有人尝试做类似事情的例子?

I am starting a new project and I am looking at using MongoDB as the document storage facility and Neo4j as the mechanism to map relationships between documents and then I want to expose the results of my queries via rest API. What would one say are the advantages and disadvantages of doing it this manner? Are there any better ways of achieving this perhaps using a different NoSQL document store? Are there any examples one could find online where someone has tried to do something similar?

推荐答案

我一直在考虑一起使用这两者,因为我的数据已经在mongodb中了.但是我不想在现有架构的基础上再增加一个数据库,因为添加neo4j将需要更多资源,例如内存,磁盘空间,更不用说花在维护2个DB上的时间了.

I have been thinking about using these two together for a while because my data is already in mongodb. But I don't want to add one more DB top of the existing architecture, because addition of neo4j will require more resources e.g. memory, diskspace and not to mention time invested in maintaining 2 DBs.

我可以想到的另一个问题是,当您使用mongodb分割数据时,您还必须管理带Neot的数据.这些新碎片. neo4j的扩展是通过群集完成的,它是商业版企业版的一部分.

Another problem which I can think of is when you shard your data with mongodb, you'll also have to manage your neo4j data w.r.t. these new shards. Scaling in neo4j is done through clusters and it is a part of enterprise edition which is commercial.

我做了进一步的研究,发现 OrientDB 可以将数据存储为文档及其图形数据库.

I did further research and found out that OrientDB can store the data as documents and its a graph db.

另一种方法是在MongoDB本身中建立关系,并在此之上编写逻辑并通过REST API公开此逻辑.

Another way is building the relationships in MongoDB itself and write your logic on top of that and expose this logic through a REST API.

这篇关于一起使用MongoDB和Neo4j的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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