文档和图形数据库选择
我对我的系统有需求:
1)朋友——需要计算用户之间最多N度的距离,找到用户之间与工作相关的共同物品。无法在 mysql 上很好地扩展它。那么我假设的选择是图形数据库?
2)我有用户配置文件字段,大约120个字段,其中80%是1:M字段,所以在mysql中这意味着大约96个表来存储1:M。如果我需要提取所有用户信息,那么我需要访问所有这些表。那么这里的解决方案是文档数据库、列数据库还是键值数据库?
目前我已经看到 OrientDB 可以充当文档和图形数据库。这可以用于满足上述需求吗?或者有更好的数据库选项吗?
谢谢。
编辑: 个人资料的要求是用户字段:IT 是职业社交网络,因此很多投资组合之类的字段都是 1:M。那么,如果有 120 个字段,其中 96 个字段是 1:M,如何最好地存储它呢?示例是您曾工作过的公司。您就读的学校。你读过的杂志。你写过的文章等等。每一个都是1:M,有96个这样的字段= 96个Mysql表。我无法合并,因为其中一些具有独特的元数据。我需要在字段中搜索并允许快速阅读以保持良好的用户体验。
对于绘图:它是关于连接人们的。对于启动,我只使用一项功能,即当您查看某人时,系统会显示您与该人之间的距离。其余“社交”功能将在发布后发布。无论如何,在 MySQL 中我都无法很好地进行扩展。如果我有 100 个朋友,每个人都是 100 个朋友,那么为了如何最好地找到这些人的出路,我假设有一个图数据库。
核心数据库平台是codeignitor PHP / Mysql。
I have needs for my system:
1) Friends - need to calculate distance between users upto N degrees, find work related common items between users. Can't scale this onmysql well. So the choice i assume is a Graph database?
2) I have user profile fields, about 120 fields with 80% of them being 1:M fields, so in mysql this means about 96 tables to store the 1:M. If i need to pull all user info then i need to reach all these tables. So a solution here is a document database, colunm database or key value database?
Currently I have seen OrientDB which can act as a document and graph database. Can this be used for the above needs or are there better DB options for this?
Thanks.
EDIT:
Req for Profile is User fields: IT is career social network so lots of portfolia like fields which are 1:M. So if there are 120 fields with 96 of them being 1:M how best to store it? Exqample is Companies you worked at. Schools you studied at. Magazines you read. Articles you have written, etc. Each of these are 1:M and there are 96ish fields like this = 96 Mysql tables. I cannot combine because some of these have unique metadata. I need to search on the fields and allow for quick read to keep user experience good.
For graphing: It is about connecting people. For launch I am only using one feature that is when yu view someone the system will say how many degrees seperate you from the person. Rest of 'social' features are for post launch. Eitherways in MySQL I cant do this well enough to scale. IF I have 100 friends and each person as 100 friends and so forst how to best find my way around these people, i assume a graph DB.
Platform is codeignitor PHP / Mysql for core DB.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
计算节点之间的距离听起来很像图数据库。 OrientDB 看起来非常令人印象深刻,我个人曾经使用过 Neo4j,你可以看看。
要给出明确的答案,您必须提供更多的要求。
Calculate distance between nodes sounds a lot like graph database. OrientDB looks very impressive, I personally have played around with Neo4j, which you might have a look at.
To give a definitive answer, you would have to provide more of your requirements.
听起来对于 RDF 数据库(又名三重存储)来说是一个很好的场景。如果您的数据与人们的联系有关...为什么不使用 FOAF 词汇表对其进行建模RDF。然后您可以使用众多三元组商店之一。如果您需要可扩展性,我推荐 4store - 用 C 编写的分布式 RDF 数据库。4store 将在集群中分发您的数据,您'将能够使用 SPARQL 查询它,
这绝对是您的情况下值得考虑的选项。
Sounds like a great scenario for RDF databases - AKA triple stores. If your data is about people's connection ... why don't you model it with the FOAF vocabulary in RDF. Then you can use one of the many triple stores. If you need scalability I recommend 4store - a distributed RDF database written in C. 4store will distribute your data in cluster and you'll be able to query it with SPARQL
Definitely an option to consider in your case.