2

Is there any way to represent this in a Property Graph:

"Peter likes Anna. This information was created by Dave. Dave is a Liar. The certainty of this information is 95%."

In a RDF Graph using Reification this could look like this: RDF Graph Example

There is no way of creating relations of relations in Property Graphs right? So how else can this be represented?

Grapheneer
  • 897
  • 8
  • 25

1 Answers1

2

You can reify relationships as nodes. Here is a (rough) example:

(Peter:Person)-[:FEELS]->(f:Feeling {type:'likes'})-[:TOWARDS]->(Anna:Person)

(f)-[:CREATED_BY]->(Dave:Person)

(Dave)-[:HAS_PROPERTY]->(p:Property {type: 'is-a'})-[:WITH_VALUE]->(:PersonType {type:'liar'})

(p)-[:CERTAINTY]->(:Certainty {value: .95})
cybersam
  • 63,203
  • 6
  • 53
  • 76
  • That's a good straight translation to a model where nodes are used between. That said, some elements of this are better modeled as properties, when it comes to actually applying a solution. Certainty feels like something that should be on the `p` property, as I don't think a :Certainty node makes much sense. – InverseFalcon Oct 17 '19 at 18:48
  • so basically 3 objects (N --> R --> N) become 5 objects (N --> R --> N* --> R* --> N) as the N* and R* are the workaround to reification. I hoped there is a way to avoid increasing graph complexity .. – Grapheneer Oct 17 '19 at 21:20