0

I am using community version of Neo4J as my graph database. I want to prevent the overriding of repeated data when the graph is rebuilt.

For example: Let's say my code fetch some data from a relational database and creates the Neo4J graph. The size of the graph that is build today is 1 GB. Next day when i build the graph again, its size becomes 2.1 GB though only .1 GB is the newly added data in my relational database.

Why does Neo4J creates the nodes again which are already present?

Does Neo4J have some intelligence to identify the new data and create only newer nodes and prevent re-building the nodes which already exists?

Kabhi
  • 135
  • 1
  • 12

1 Answers1

1

You're looking for MERGE. You should really read the whole chapter on Cypher to understand its capabilities.

Frank Pavageau
  • 11,477
  • 1
  • 43
  • 53
  • There is also a `CREATE UNIQUE` command, but I never used it - `MERGE` works fine for me. Also have a look at `CREATE CONSTRAINT`... – user85421 Nov 22 '16 at 14:20
  • @Frank Thanks, I'm on it. I also saw this http://stackoverflow.com/questions/25177788/neo4j-cypher-update-existing-node-or-create-new-node and found very close to my query. – Kabhi Nov 23 '16 at 08:51