4
votes

I'm using Neo4j Community edition 2.1.4. I have hierarchy of 4 levels and each level names i have treated it as label name for that level.So in my graph i have totally 4 labels. Now for the first time I have loaded csv file into neo4j and using MERGE and CREATEkeywords created the nodes and relationships. In future the requirement is like

scenario 1:

if someone wants to rename the hierarchy level name to some new name, then I have to   
change the label name to a new name.

Scenario 2:

if any of the property name of node changes to to new name 

In the both the cases i wanted to track the history of the node. How can i do it? So that in future someone wants to see the history details , they can query and get the details.

So how can i track the history details of the nodes in neo4j?

My Approch: For the first time i will load the csv file and create nodes and relationships. Then if someone wants to change the label name of node A(level name which is standard) which is having a properties like ID, name,start_date,end_date,Status.Then i will replicate the node A with all the properties and change the status to inactive and i will overwrite the old node with the new details. But i'm clueless whether this solution is going to work or not. Also i have more thane 10000 nodes in my db.

So please suggest me a better approach to track the nodes history.

2
You can use versionning. Examples in this blog post : neo4j.org/graphgist?608bf0701e3306a23e77 that you can adapt for your needsChristophe Willemsen
@ChristopheWillemsen Perfect, you should make that an answer, it is the answer! See also the answer on this question from earlier today stackoverflow.com/questions/26127263/…JohnMark13
@shree11 you should accept some answers.JohnMark13

2 Answers

2
votes

Have a look at the GraphAware ChangeFeed Module. You can track history of changes and also configure which changes you would like to track and which to ignore.

0
votes

You can use versionning. Examples in this blog post : neo4j.org/graphgist?608bf0701e3306a23e77 that you can adapt for your needs