Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
10-01-2018 08:47 PM
Hi,
I require the archival/immutable record in neo4j of all changes to nodes and relationships between nodes.
For example: 1) when properties of existing node(s) need modifying, and 2) when relationship(s) between existing nodes are changed
Here is what I've thought of so far, would love to hear any feedback / suggestions you may have;
Case 1 - node property change
Consider this: A House has a Room with windows and doors. (House)-[:HAS]->(Room)
In this example I need to change the number of doors from 1 to 2, and to have a record of the change.
My idea:
I would create a new node with updated properties; include MODIFIED_BY and PRECEDED_BY relationships; replace HAS to HAD; create HAS to new node.
How would you do it?
Next case - When you need to replace an object node with another, existing node
Let's say we have 2 houses, and both owners decide to swap and sell their houses to each other:
Therefore I would need to change house 10 OWNED_BY Bob, and 12 by Fred.
What's the best way to include the history of the change in this case?
Many thanks for your feedback!
10-02-2018 02:25 AM
There a very good blog post on that topic, see https://iansrobinson.com/2014/05/13/time-based-versioned-graphs/.
10-02-2018 01:44 PM
Thank you! I had not seen this blog post before.
All the sessions of the conference are now available online