This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= Network versioning using relationnodes | |
Recently there was a nice blog on versioning networks by Ian Robinson (http://iansrobinson.com/2014/05/13/time-based-versioned-graphs/[read it here]) on using identity nodes and separating structure from state. In this gist I'd like to put in my 2 cents by introducing another approach using _relationnodes_. This is more about structure of a network than about states of nodes, but it treats versioning differently. As Ian states in his blog, there's always a trade-off to be made, since versioning causes an extra load on storage and processing. | |
== Relationnodes? | |
=== What are relationnodes? | |
Relation nodes are intermediary nodes between two network nodes that represents the relation between the nodes. | |
So, if A and B are two network nodes, instead of connecting them with a relationship of `[:RELTYPE]`, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= Using hierarchical facets | |
We have a usecase with documents that are tagged with keywords in a theasaurus. This gists explains the model and is at the same time an invitation to suggest improvements. Because it would be nice to have something that performs better. | |
NOTE : In this example we have a quite regular thesaurus. IRL the thesaurus with branches of varying depth and docs are tagged with both leaf and non-leaf nodes (i.e. nodes without and with children repectively) | |
== The model | |
//setup | |
[source,cypher] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Evaluating a logical tree with Cypher / APOC | |
I'm looking at a set of logical ports that together determine which rules apply to given entities, based on the existence of properties. This is the dataset: | |
//setup | |
[source,cypher] | |
---- | |
CREATE (_181732:Entity {`name`:'A'}) | |
CREATE (_181733:Entity {`name`:'B'}) |