0
votes

I'm using ne04j 2.1.2 community edition.

I have a nodes with a label called Company and I created these nodes and label by loading CSV file along with the MERGE and CREATE commands. So in future if my label names changes,say Company to Organization, I wanted to maintain the createddate, UpdatedDate, NewLabelName, OldLabelName values somewhere.

So in order to achieve that I thought of maintaining one master node which holds the label information i.e., it should have the properties like NewLabelName, OldLabelName, CreatedDate, UpdatedDate. So the label name should come from the Master Node to other nodes. Whenever we made any changes to label ,then the corresponding UpdatedDate property value should be updated in the master node and NewLabelName should come from the master node to other nodes (nodes for which that label belongs to) .

Hope you understand the scenario here.

But how can i achieve this ? is it possible to achieve ? if yes, then how can i define the relationship between master and other nodes? (Here my other nodes are Name of the Companies like Google, Yahoo, Samsung etc.. and those will be having some other child nodes like location)

Please suggest the solution. (I wanted to achieve these using cypher not using java)

Thanks

1

1 Answers

0
votes

Although labels can be changed, you should do that rarely (e.g., to recover from a mistake). Changing a large number of labels is very expensive and should never be done as a part of normal processing.

Also, like a Java class name, a label name is not something you'd normally show to end users. So, there is really no reason to ever change them. Just try to pick reasonable label names to start with, and don't plan to change them.