您对哪个数据库在后端处理好友方面拥有最好的体验?

发布于 2024-11-26 15:31:57 字数 740 浏览 0 评论 0原文

由于我的最后一个问题被认为是主观的: ( ,我试图使其更具体。

我正在用 PHP 构建一个应用程序,用户可以在其中互相“交友”。这似乎最适合图形数据存储......例如,您可以拥有这个集合传统领域的RDBM:

id | user1 | user2

并且您必须处理重复数据(id = 1,user1 = Joe,user2 = Jeff,id = 2,user1 = Jeff,user2 = Joe)...

您还必须搜索两列对于一个用户来说,

当执行某个朋友的朋友搜索时,

  1. 您是否同意图形数据库是最好的?
  2. 您的经验,为什么它是最好的?
  3. 根据 值得吗获取图形存储的开销,或者是否有一个好的方法可以解决好友关系的主要问题,同时将其保留在 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.

  1. Do you agree a graph database is best?
  2. If so, which one? and why is it best in your experience?
  3. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

雪若未夕 2024-12-03 15:31:57

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文