English 中文(简体)
如何在图表数据库中组织节点
原标题:How to organize nodes in a graph database

我们重建了图表数据库,我们回想如何模拟图表结构。 这一想法的使用者与几个方面(朋友、博客职位等)有关系。 我们怀疑,如果它能更好地拥有像这样的中间点:

User1 -+-> Friends -+-> User2
       |            |
       |            +-> User3
       |
       +-> Posts -+-> Post1
                  |
                  +-> Post2

或者如果你将用户与他拥有的物品直接连接起来,就如:

User1 -+-> User2
       |
       +-> User3
       |
       +-> Post1
       |
       +-> Post2

我们看到这两种风格的好处和问题。 听取具有更多社会图表经验的人的意见,对我们来说非常重要。

最佳回答

首先要记住的是,如果你有多种(繁多的)不同类型的关系,那么你就会陷入一个目前的问题,即为 no子(如果是装上ache锁的)装满关系,即使你只想获得某种特定关系,也必须装满。 我认为,这一负荷问题将很快得到解决。

Another thing you could keep in mind is that friends may not be very many, although posts will and having all posts connected directly to the user will have you run into the issue of sorting too when the number of posts increases. That s why I d suggest you to put posts in a linked list on the user, with the most recent first. This will make them naturally sorted by date, like:

User -+-> Post3 --> Post2 --> Post1
  |
  +-> User2
  |
  --> User1
问题回答

暂无回答




相关问题
NO-SQL reliable for small business app?

I m deciding between go for a NON-SQL engine or a regular SQL one for a document managment system for small bussines. I have experience with firebird/sql server and found a good track of reliability (...

CouchDB View, Map, Index, and Sequence

I think read somewhere that when a View is requested the "map" is only run across documents that have been added since the last time it was requested? How is this determined? I thought I saw something ...

Cassandra Vs Amazon SimpleDB

I m working on an application where data size and SQL queries are going to be heavy. I am thinking between Cassandra or Amazon SimpleDB. Can you please suggest which is more suitable in this kind of ...

representing a many-to-many relationship in couchDB

Let s say I m writing a log analysis application. The main domain object would be a LogEntry. In addition. users of the application define a LogTopic which describes what log entries they are ...

Riak on Windows

I want to play with Riak http://riak.basho.com/ or a least get it running on a Windows system. I have downloaded the source code and compiled it but that s where I get stuck, how do I start it?

MongoDB takes long for indexing

I have the following setup: Mac Pro with 2 GB of RAM (yes, not that much) MongoDB 1.1.3 64-bit 8 million entries in a single collection index for one field (integer) wanted Calling .ensureIndex(...) ...

热门标签