在Galaxybase中,是否有可能获取两个节点之间的两个不同关系时间?

huangapple go评论89阅读模式
英文:

Is it possible to get two different relation times between two nodes in Galaxybase?

问题

我是新来的 Galaxybase,正在尝试使用它来学习更多。

如果我在空间中创建两个节点并建立它们之间的关系,还附带一个时间戳来表示他们何时成为朋友,如果我将方向设置为“无”并只创建一次关系,是否可以检索到相同关系的两个不同时间戳?你可以提供一个示例来说明这可能如何工作吗?

英文:

I am new to Galaxybase and I'm playing around with it to learn more.

If I create two nodes in the space and establish a relationship between them, along with a timestamp indicating when they became friends, can I retrieve two different timestamps for the same relationship if I set the direction as "no" and only create the relationship once? Can you provide an example of how this might work?

答案1

得分: 0

作为示例,您可以创建一个图模型,如下所示:

人物 - 关系程度 - 人物

"Person" 是顶点的名称,"Degree of Relationship" 是边的名称。边可以设置以下属性:程度、时间、地点等。

"degree" 可以设置为 STRING 类型,内容可以设置为:相遇、相识、恋爱、结婚、离婚等。并在 "time" 属性中设置相应的时间。

英文:

As an example, you could create a graph model such as:

person - degree of relationship - person

The "Person" is the name of the vertex and the "Degree of Relationship" is the name of the edge. The Edge can be set with the following properties:degree, time, place, etc.

The "degree" can be set to STRING type, and the content can be set to: met, known, in love, married, divorced, etc. And set the corresponding time in "time" property.

huangapple
  • 本文由 发表于 2023年5月10日 11:27:54
  • 转载请务必保留本文链接:https://go.coder-hub.com/76214694.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定