I have some questions about node versionning (storing history of a graph) and effectivity:
Assume one as a set of nodes and relations that evolve over time:
(nodeA00:MyNode {nodeidentifier:"000A" noderev:"00"})-[rel00:MyRelation {RelationRev:00}]-(nodeB00:MyNode {nodeidentifier:"000B" noderev:"00"})
at some point in time
nodeA gets modified with an aditional nodeC
will be
(nodeA01:MyNode {nodeidentifier:"000A" noderev:"01"})-[rel00:MyRelation {RelationRev:00}]-(nodeB00:MyNode {nodeidentifier:"000B" noderev:"00"})
(nodeA01:MyNode {nodeidentifier:"000A" noderev:"01"})-[rel01:MyRelation {RelationRev:00}]-(nodeC00:MyNode {nodeidentifier:"000C" noderev:"00"})
a user might also revise the relation (e.g modify an relation property such as quantity)
now i would like to introduce some kind of validity/effectivity of versions on nodes and relations.
a node version or relation might be valid through multiple date ranges.
my intend is to create an validity relation to each node version like so
(nodeA01:MyNode {nodeidentifier:"000A" noderev:"01"})-[effectivity1:EffectivityRelation]->effiectitynode1:Effectivity{From:"2019/01/01",To:"2019/01/31"})
(nodeA01:MyNode {nodeidentifier:"000A" noderev:"01"})-[effectivity1:EffectivityRelation]->(effiectitynode2:Effectivity{From:"2019/05/01",To:"2019/05/31"})
This way nodeA Rev 01 would be valid in january and may 2019 but not in february,march and april
There are two questions related to this datamodel.
a) how would i query for the subgraph configured with latest effectivity on a specific date?
b) how can i model multiple effectivities for a relation (like for the node). As of now i have a workaround i call a "PseudoRelation" representing "relations" via a node+primary and secondary relations. But if anyone has a better idea, im am happy to evaluate. The "RelationNode" Concept has got also the possibilty to serve as an n:m PseudoRelation.
regards
Thomas