Data Model
patinaDB stores a labelled property graph.
Vertices (nodes)
A vertex has:
- A stable UUID identity (assigned on creation, baked into the engram log so replays are deterministic).
- A primary label plus zero or more secondary labels (multi-label nodes
are supported;
labels(n)returns all of them). - A set of properties — string keys mapped to typed values.
CREATE (a:Person:Employee {name: 'Ada', born: 1815})
Edges (relationships)
An edge is directed, has exactly one type (a label), connects two vertices, and may carry its own properties:
CREATE (a)-[:KNEW {since: 1833}]->(b)
Edges can be traversed in either direction, and patterns may be left-to-right,
right-to-left, or undirected (-[:KNEW]-), in which case both directions
are searched.
Property value types
The AttributeValue type covers:
| Type | Example literal | Notes |
|---|---|---|
| String | 'hello' | Order-preserving in the value index. |
| Integer | 42 | 64-bit signed. |
| Float | 3.14, 1.0e9, .5 | 64-bit IEEE-754. |
| Boolean | true, false | First-class (AttributeValue::Bool). |
| Null | null | Drives three-valued logic (see below). |
| List | [1, 2, 3] | Heterogeneous; indexable, sliceable. |
| Map | {a: 1, b: 'x'} | Nested. |
| Temporal | date('2026-06-28'), datetime(...) | Date / Time / LocalTime / DateTime / LocalDateTime / Duration. |
| Path | result of a path pattern | Sequence of nodes and edges. |
Three-valued (Kleene) logic
Comparisons and boolean operators follow SQL-style three-valued logic. Any
comparison involving null yields Unknown, not true or false:
RETURN 1 = null // null (Unknown)
RETURN null AND false // false (false dominates)
RETURN null OR true // true (true dominates)
IS NULL / IS NOT NULL remain strictly two-valued, by specification. In a
WHERE filter, Unknown collapses to “not matched”.
Storage internals (informational)
Properties are kept in a label-scoped, order-preserving value index, so a
scan over :Person.born never returns :Robot nodes with the same value, and
sorted pagination over a property is O(limit) rather than a full scan.
Compound indexes over several fields accelerate equality-prefix + sort
queries. You normally don’t manage these directly — they are maintained
automatically on writes. To declare your own indexes and enforce data integrity,
see Constraints and Query Planning;
Limitations lists the current DDL gaps.