neo4j Cypher Creation


Create a node

CREATE (neo:Company) //create node with label 'Company'

CREATE (neo:Company {name: 'Neo4j', hq: 'San Mateo'}) //create node with properties

Create a relationship

CREATE (beginning_node)-[:edge_name{Attribute:1, Attribute:'two'}]->(ending_node)

Query Templates

Running neo4j locally, in the browser GUI (default: http://localhost:7474/browser/), you can run the following command to get a palette of queries.

:play query template

This helps you get started creating and merging nodes and relationships by typing queries.