36. “Find and Insert”
MATCH (a:Artwork {id: 123}),
(b:Artwork {id: 456})
CREATE (a)-[:is_similar_to]->(b);
37. “Update or Insert then Create”
MERGE (artwork:Artwork {id: 123, source: ”frick”})
CREATE (image:Image {id: 456, source: “frick”})
CREATE (artwork)-[:photo]->(image);
38. Import data from CSV
USING PERIODIC COMMIT 500
LOAD CSV WITH HEADERS FROM "file://foo.csv" AS line
MERGE (artwork:Artwork {id: line.artwork, source: line.source)})
CREATE (image:Image {id: line.image, source: line.source})
CREATE (artwork)-[:photo]->(image);