title: Difference between merge and create unique in Neo4j
body: <p>I'm trying to figure out what is the difference between MERGE and CREATE UNIQUE. I know these features:</p>
  
  <h1>MERGE</h1>
  
  <p>I'm able to create node, if doesn't exist pattern. </p>
  
  <pre><code>    MERGE (n { name:"X" }) RETURN n;
  </code></pre>
  
  <p>This create node "n" with property name, empty node "m" and relationship RELATED.</p>
  
  <pre><code>    MERGE (n { name:"X" })-[:RELATED]-&gt;(m) RETURN n, m;
  </code></pre>
  
  <h1>CREATE UNIQUE</h1>
  
  <p>I'm not able to create node like this.</p>
  
  <pre><code>    CREATE UNIQUE (n { name:"X" }) RETURN n;
  </code></pre>
  
  <p>If exists node "n", create unique makes empty node "m" and relationship RELATED.</p>
  
  <pre><code>    MATCH (n { name: 'X' }) CREATE UNIQUE (n)-[:RELATED]-&gt;(m) RETURN n, m;
  </code></pre>
  
  <p>If this pattern exists, nothing created, only returns pattern.</p>
  
  <p>From my point of view, I see MERGE and CREATE UNIQUE are quite same queries, but with CREATE UNIQUE you can't create start node in relationship. I would be grateful, if someone could explain this issue and compare these queries, thx.</p>