Graph Reference
Cinch graph databases use Ladybug (a fork of Kuzu), which speaks a Cypher dialect that is mostly compatible with Neo4j but has important differences. Standard Neo4j drivers work out of the box over Bolt.
Schema-first: the biggest difference
Neo4j lets you create nodes on the fly without declaring a schema. Cinch requires you to define node and relationship tables before inserting data. Every node table must have a PRIMARY KEY column.
-- Define node tables
CREATE NODE TABLE Person(name STRING PRIMARY KEY, age INT64)
CREATE NODE TABLE City(name STRING PRIMARY KEY, population INT64)
-- Define relationship tables (must specify FROM and TO)
CREATE REL TABLE KNOWS(FROM Person TO Person, since INT64)
CREATE REL TABLE LIVES_IN(FROM Person TO City)
-- Now you can insert data
CREATE (a:Person {name: 'Alice', age: 30})
CREATE (b:Person {name: 'Bob', age: 25})
-- SERIAL for auto-incrementing IDs
CREATE NODE TABLE Event(id SERIAL PRIMARY KEY, title STRING, date DATE)✓
IF NOT EXISTS
Use
CREATE NODE TABLE IF NOT EXISTS to make schema setup idempotent. Safe to run on every connection.Differences from Neo4j
| Feature | Neo4j | Cinch (Ladybug/Kuzu) |
|---|---|---|
| Schema | Schema-free. Create nodes on the fly. | Schema-first. CREATE NODE TABLE / CREATE REL TABLE before inserting. |
| Primary keys | Optional. Internal IDs used by default. | Required. Every node table needs a PRIMARY KEY column. |
| Multiple labels | Nodes can have multiple labels. | Nodes have exactly one label (their table name). |
| Relationship tables | Relationships created inline. | Must declare with CREATE REL TABLE(FROM X TO Y). |
| REMOVE clause | REMOVE n.prop | Not supported. Use SET n.prop = NULL instead. |
| WHERE in patterns | MATCH (n:Person WHERE n.name = 'Alice') | Not supported. Use MATCH (n:Person) WHERE n.name = 'Alice' |
| Label in WHERE | WHERE n:Person | Not supported. Use MATCH (n:Person) or WHERE label(n) = 'Person' |
| Variable-length paths | Trail semantics (no repeated edges) | Walk semantics by default (allows repeated edges). Use TRAIL modifier for Neo4j behavior. |
| Type system | Flexible lists and maps | Stricter: LIST elements must be same type, MAP keys must be same type. |
Variable-length paths
By default, variable-length path queries use walk semantics, which allows repeated nodes and edges. This differs from Neo4j's default trail semantics. Use the TRAIL or ACYCLIC modifiers to change this:
-- Default: walk semantics (allows repeated edges)
MATCH (a:Person)-[e:KNOWS*1..4]->(b:Person) RETURN a.name, b.name
-- Trail: no repeated edges (Neo4j default behavior)
MATCH (a:Person)-[e:KNOWS* TRAIL 1..4]->(b:Person) RETURN a.name, b.name
-- Acyclic: no repeated nodes
MATCH (a:Person)-[e:KNOWS* ACYCLIC 1..4]->(b:Person) RETURN a.name, b.name
-- Shortest path
MATCH (a:Person)-[e:KNOWS* SHORTEST 1..10]->(b:Person) RETURN a.name, b.nameSupported Cypher
- Schema: CREATE NODE TABLE, CREATE REL TABLE, DROP TABLE, ALTER TABLE
- Node operations: CREATE, MERGE, MATCH, DELETE, DETACH DELETE, SET
- Relationship operations: CREATE, MATCH, DELETE with typed and directional relationships
- Pattern matching: variable-length paths, shortest path, path expressions
- Clauses: WITH, UNWIND, OPTIONAL MATCH, UNION, CALL
- Aggregations: COUNT, SUM, AVG, MIN, MAX, COLLECT
- Filtering: WHERE, AND, OR, NOT, IN, STARTS WITH, CONTAINS, regular expressions
- Ordering: ORDER BY, SKIP, LIMIT
- Indexes: CREATE INDEX, DROP INDEX
- Constraints: uniqueness constraints
- Parameters:
$paramNamesyntax - Transactions: BEGIN, COMMIT, ROLLBACK (via driver API)
Bolt protocol
| Feature | Details |
|---|---|
| Bolt versions | 4.4, 5.0 through 5.7 |
| Auth | Basic auth (username: neo4j, password: your token) |
| Concurrent connections | 256 per database |
| Transactions | Auto-commit and explicit (BEGIN/COMMIT/ROLLBACK) |
| Bookmarks | Supported for causal consistency |
Not supported
- APOC procedures
- Graph Data Science (GDS) library. Use Cypher path-finding instead.
- Multiple labels per node
- REMOVE clause (use SET prop = NULL)
- WHERE inside MATCH patterns
- FINISH clause
- USE graph (each database is a separate graph)
See Graph for connection examples.