1

我有以下 SDN5 节点实体:

@NodeEntity
public class Decision {

    @Index(unique = true)
    private Long id;

}

@NodeEntity
public class Characteristic{

    @Index(unique = true)
    private Long id;

}

根据我的业务需要,我可以有几十万几十上百个节点。Decision Characteristic

我还需要将每个节点的值放在每个Decision节点Characteristic上。在某些情况下,我可以在相同Decision和 `Characteristic.

我看到了两种可能的实现方式:

1.value属性放入和Decision Characteristic@RelationshipEntity之间,该属性将包含一个数组。DecisionCharacteristic. In case of multiple values(of the same types) between the sameandvalue

2.引入新的Value @NodeEntity并添加两个@RelationshipforDecisionCharacteristic. In case of multiple values(of the same types) between the sameDecision andCharacteristic - 将创建所需数量的单独Value节点。

我最大的标准是对用户需求的实时查询性能——DecisionsCharacteristics.

考虑到这一点——我应该选择什么方式来创建所描述系统的模式——1或者2

我知道@RelationshipEntity不支持模式索引的属性(可以使用 APOC 关系属性手动索引添加此行为的模拟)。另一方面,@NodeEntity支持属性的模式索引,但引入额外的 Value 节点会增加查询期间遍历的关系计数。

此外,如果同一DecisionCharacteristic in case of the solution with@RelationshipEntity property must be represented as array property on@RelationshipEntity` 之间有多个值,我不知道如何在那里索引数组。

请告知如何正确设计此类架构以及选择哪种方式。

4

0 回答 0