I am creating Nodes City with properties Name and ID.City node may be indexed on Id.I want unique node.
Now when populating database I want to get City node if present otherwise I want to create a City node.
What is the best way to do that?
Create a Cypher execution engine and a unique constraint. And then Use MERGE to create a unique node.
Or something like
Check if the City with that id is present **Match
START n=node:City(id = { id }) RETURN n**
if n==null Create the Node
Which is fast?What if I won't index city?