I have two nodes in my Neo4J graph db, node User and node Video, and I want to create relationship between them.
Node User exists for sure, but node Video might not. If that's the case it should be created with given id, and after creation of node relationship between them is created also.
I know I can first check if Video node exists and if it don't exists I can create it first. But could creation of Video node (if it don't already exists) and relationship between User and Video node be done in single call?
Also, I must prevent that some concurrent request create the same Video node before first request finished job.
So please give me ideas how to achieve this request. I'm very new with graph database concept and with Neo4J.