简体   繁体   English

在图数据库上存储图节点的内容/引用

[英]Storing contents/references of the graph nodes on a graph db

I am building a social network natured web app. 我正在构建一个社交网络性质的Web应用程序。 there are a number of related entitites like publishers, users, publications, posts, comments; 有许多相关实体,例如发布者,用户,出版物,帖子,评论; with relations like subscribe, like, share, comment, friend, follow, work, author. 与诸如订阅,喜欢,分享,评论,朋友,关注,工作,作者等关系。 Also as usual there is content of some of the entities lie contents of publications, posts, comments. 同样,某些实体的内容也包括出版物,帖子,评论的内容。

Publications and Posts are similar and just like classical social posts with more than one text or one media files. 出版物和帖子是相似的,就像具有多个文本或一个媒体文件的古典社交帖子一样。 And Publications, Posts, and Comments will be ever increasing and will reach high numbers. 出版物,帖子和评论将不断增加,并将达到很高的数量。

I plan to use Cayley db maybe dependence on Postgresql. 我计划使用Cayley db也许依赖于Postgresql。

My so far complete tuples describing relations of entitites are so: 我到目前为止描述实体关系的完整元组是如此:

publisher -publish- publication
user -subscribe- publisher
user -comment- publication
user -like- publication
user -share- publication

user -post- post
user -friend- user
user -comment- post
user -like- post
user -share- post

publisher -follow- publisher

user -work- publisher
user -author- publication

The question is: 问题是:

Where to store my posts/comments, which have also content such as one to many text fields and media files, and will be liked, shared, and commented by users? 我的帖子/评论存储在哪里,其中也包含诸如一对多的文本字段和媒体文件之类的内容,并且会被用户喜欢,共享和评论?

Should I store posts/comments in graph database, if so should I store content or store only a reference and store content in another database, table or document? 我应该将帖子/评论存储在图形数据库中吗,如果应该存储内容或仅存储引用,并将内容存储在另一个数据库,表或文档中? Regarding quantities of these entities will reach large numbers. 关于这些实体的数量将达到大量。

Stumbled upon this open question and thought I try to answer it for future reference. 偶然发现了这个悬而未决的问题,以为我尝试回答该问题以供将来参考。

And of course it totally depends on your implementation and the requirements. 当然,这完全取决于您的实现和要求。 Comments you can store in Cayley, but I would leave images/video or other media out of it. 您可以在Cayley中存储评论,但我将图像/视频或其他媒体排除在外。 Just store a URI to the specific resource or an UUID for the object in another datastore. 只需将URI存储到特定资源或将对象的UUID存储在另一个数据存储中。

Also for comments; 也征求意见; you could store the UUID/ID for the comment in your graphdb and store the actual comment in Postgres or even in a file on disk (just as an example). 您可以将注释的UUID / ID存储在graphdb中,并将实际注释存储在Postgres中,甚至存储在磁盘上的文件中(仅作为示例)。

I personally prefer to keep my graphdb as small as possible and store actual content in a different storage. 我个人更喜欢使graphdb尽可能小,并将实际内容存储在其他存储中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过删除节点(顶点)实现几乎集群图的图集群 - Graph Clustering for almost Clustered Graph by removing nodes(vertices) 图中节点与其他节点之间的关系 - Relation between node to other nodes in a graph 在网络图中获取断开的节点对? - Get disconnected pairs of nodes in the network graph? 当一个属性相同时连接图中的节点(NetworkX) - Connect nodes in a graph when one attribute is the same (NetworkX) 是否有任何在sql server 2008中的hierarchyid中存储社交网络图的示例 - Is there any examples of storing social network graph in hierarchyid in sql server 2008 如何 select 从图中获得良好的节点样本大小 - How to select a good sample size of nodes from a graph 图表DB的社交网络应用程序的Vs Azure表存储 - Graph DB's Vs Azure Table storage for a Social networking application 强制导向图绘制:编辑特定节点之间的力(R) - Force-directed graph drawing: Edit the force between specific nodes (R) 图聚类 - Graph Clustering 如何从Java获取Neo4j图形数据库的节点数,如何从磁盘存储和重用graphdb? - How can I get the number of nodes of a Neo4j graph database from java and can we store and reuse graphdb from disk?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM