Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-17-2019 01:42 PM
A hyper-edge is a graph construct that is a relationship with 3 or more endpoints. Neo4j does not have these, but I would like to fake one in Neo4j.
The idea would follow this example of modeling a contract:
Can anyone recommend an approach, even different from mine?
Solved! Go to Solution.
05-22-2019 07:15 AM
I no longer believe that a hyper-edge is necessary for this. The contract can take the place of the hyper-edge above and connect directly to the two Person nodes. I will close this question and post a better defined question.
05-19-2019 02:20 PM
Okay, an addional thought came to me over the weekend. Every member (node) connected to a hyper-edge node could share a label that marks it as a member of that relationship. Then a trigger can be defined for every member, so that any changes on any of the hyper-edge members would trigger a lookup of the ContractHyperEdge itself, and cause it to do the contract enforcement check. If it fails, the transaction fails, whether it was invoked on the ContractHyperEdge or on any of the member nodes. The label they all share would not be needed for indexed lookups; the only reason for giving them the same label is so that a query can quickly identify the 'rest' of the contract members, using only traversal--all one hop away from the ContractHyperEdge.
And the label--let's say it's named "PhotoShareContract"--can be used broadly across the database on many different contracts without conflict. Even if one person has multiple contracts of the same name with different people, the 3 relationships connecting them can hold a property shared only by those 3...perhaps a combination of date and contract participant ids.
05-22-2019 07:15 AM
I no longer believe that a hyper-edge is necessary for this. The contract can take the place of the hyper-edge above and connect directly to the two Person nodes. I will close this question and post a better defined question.
01-29-2021 09:20 AM
Also see:
I think HyperEdges would require the Neo4J internals to be radically altered, which is not desired.
09-23-2021 04:21 AM
Well articulated article. Thanks clem!
09-23-2021 05:36 AM
Hello @neo4joe
I'm working with hyper-edges (simplicial complex) and Neo4j and we model it as a bipartite graph.
Regards,
Cobra
All the sessions of the conference are now available online