您对哪个数据库在后端处理好友方面拥有最好的体验?
由于我的最后一个问题被认为是主观的: ( ,我试图使其更具体。
我正在用 PHP 构建一个应用程序,用户可以在其中互相“交友”。这似乎最适合图形数据存储......例如,您可以拥有这个集合传统领域的RDBM:
id | user1 | user2
并且您必须处理重复数据(id = 1,user1 = Joe,user2 = Jeff,id = 2,user1 = Jeff,user2 = Joe)...
您还必须搜索两列对于一个用户来说,
当执行某个朋友的朋友搜索时,
- 您是否同意图形数据库是最好的?
- 您的经验,为什么它是最好的?
- 根据 值得吗获取图形存储的开销,或者是否有一个好的方法可以解决好友关系的主要问题,同时将其保留在 MySQL 中
。 如果您对这篇文章仍然有疑问,如果您能告诉我是否有任何特定的方式来提出这个问题并被视为“建设性”帖子,我将不胜感激? gmail 我 (joedevon)、推特我 (joedevon)、在评论中添加。无论哪种方法最适合你......
我只想从其他程序员那里得到一些意见,我认为这个问题很常见,充满机会和问题,而且很有趣。令人惊讶的是,原作并不被认为对SO有好处,但他们的规则......
Since my last question was considered subjective :( , I'm trying to make it more specific.
I'm building an application in PHP where users can "friend" each other. This seems to be best suited to a graph datastore... For example, you can have this set of fields in a traditional RDBMs:
id | user1 | user2
and you have to deal with duplicate data (id = 1,user1 = Joe, user2 = Jeff, id=2, user1=Jeff, user2=Joe)...
You also have to search both columns for one user.
When performing certain friend of a friend searches, the recursion can be tricky indeed.
- Do you agree a graph database is best?
- If so, which one? and why is it best in your experience?
- Since client already has MySQL, is it worth the overhead to obtain a graph store, or is there a good approach to the main issues with friending while keeping it in MySQL.
P.S. TO MODERATORS:
If you still have a problem with this post, I'd most appreciate if you could tell me if there's any particular way to ask this question and be considered a "constructive" post? gmail me (joedevon), tweet me (joedevon), add it in a comment. whatever method suits you best...
I just want some input from fellow programmers and I think the problem is common, filled w/ opportunities and issues, and interesting. Amazed that the original wasn't considered good for SO, but thems the rules...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许提及您用于构建该应用程序的语言是相关的。如果是Java,我认为neo4j没有真正的竞争对手。 (我的观点)
也许您已经看过这些 neo4j 演示系列< /a>,但在该演示文稿的 200 秒中,您可以看到多语言持久性的用例,这意味着您可以利用现有的数据模型或不需要的数据模型是类型自由的或不适合图形数据模型,与将在后台使用 Neo4j 及其图形数据模型的应用程序方面(用户绑定和关系)一起。
Spring Data 项目 使这变得非常简单,我认为这是一个非常有前景的方法。
Maybe it would be relevant to mention what language you use for building that app. If it is Java, I think there is no real competitor to neo4j. (my opinion)
Maybe you've already seen these neo4j presentation series, but in the 200. second of that presentation, you can see use case for Polyglot persistence, which means that you could utilize your existing data model or data model that doesn't need to be type free or isn't suitable for Graph data model, TOGETHER with the aspect of application (user bonding and relationships) that would use neo4j under the hood and its graph data model.
Spring Data project makes this really easy and I consider this a very perspective way to go.