Skip to main content
The CREATE clause is used to introduce new nodes and relationships into the graph.

Creating Nodes

The simplest example creates a single node without any labels or properties:
You can create multiple entities by separating them with commas:
Create a node with a label and properties:

Creating Relationships

To add relationships between nodes, you typically match existing nodes first, then create the relationship. In this example, we find an existing source node and create a new relationship with a new destination node:
Here the source node (a:Person) is matched (bound), while the destination node (:Band) is unbound and will be created. This query creates a new node representing the band Nirvana and a new MEMBER relationship connecting Kurt to the band.

Creating Complete Patterns

You can create entire graph patterns in a single statement. All entities within the pattern that are not bound (matched) will be created:
This query creates three nodes (Jim, Pam, and an Employer) and two relationships (FRIENDS and WORKS), establishing a complete graph pattern in one operation.

Frequently Asked Questions

Yes. You can create entire graph patterns in one CREATE statement. All unbound entities in the pattern will be created as new nodes and relationships.
Use MATCH to find the existing nodes first, then CREATE the relationship: MATCH (a:Person {name: 'Alice'}), (b:Person {name: 'Bob'}) CREATE (a)-[:KNOWS]->(b).
FalkorDB allows creating nodes without labels using CREATE (n). The node will exist in the graph but cannot be efficiently queried by label-based index scans.
Yes. Include properties in curly braces: CREATE (:Person {name: 'Alice', age: 30}). Multiple properties are separated by commas.