简体   繁体   中英

Dynamic Nodes and relationship creation in Neo4j

I am storing Hierarchy data in Neo4j. I want to store history of the Node. Consider I have a label called GROUP and the earlier name was "MARKETING" now it has been changed to "MARKET123". So i want to create a new node where the name will be MARKET123 and the create a relationship with other connected node same as for the older node named "MARKETING"... But all this i want to do dynamically instead of passing the other Nodes name and the relationship value in the cypher query.

Please suggest me how it can be done.

You can add versioning to your graph nodes.

Here is a graph gist about time-based versioning that you may adapt to your needs.

http://www.neo4j.org/graphgist?608bf0701e3306a23e77

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM