Skip to content

Data Model

CoordiNode uses a property graph extended with vector, spatial, time-series, and document capabilities — all within a single unified model.

Core Primitives

Nodes (Vertices)

A node represents an entity. It has:

  • One or more labels (type tags): :Person, :Document, :Sensor
  • A map of properties (typed key-value pairs)
cypher
CREATE (p:Person {name: "Alice", age: 30})

Edges (Relationships)

An edge connects two nodes directionally. It has:

  • Exactly one relationship type: KNOWS, RELATED_TO, ABOUT
  • A map of properties (weight, timestamp, confidence, …)
cypher
CREATE (a)-[:KNOWS {since: 2024}]->(b)

Edges are first-class citizens — they can be traversed, filtered, and returned like nodes.

Properties

CoordiNode supports all standard property types:

TypeExampleNotes
String"Alice"UTF-8
Integer42i64
Float3.14f64
Booleantrue
List[1, 2, 3]Homogeneous or mixed
Map{x: 1, y: 2}Nested document
Bytes$blobArbitrary binary
Vector[0.1, 0.2, ...]Dense float array
DateTimedatetime("2024-01-01")ISO 8601, timezone-aware

Labels and Modalities

Labels are arbitrary user-defined strings — :Person, :Article, :Sensor. CoordiNode does not have reserved "special" labels for storage modes.

A node becomes multi-modal through its property types. A node with a vector-typed property participates in vector search; a node with a text property participates in full-text search — regardless of its label name.

cypher
-- One node: graph + vector + full-text, defined by its properties
CREATE (d:Document {
  title: "Attention Is All You Need",
  body: "We propose a new simple network architecture...",
  embedding: [0.1, 0.2, ...]   -- stored as a Vector property → HNSW index
})
Property typeStorageUse case
String, Int, Float, BoolGraph recordStandard entities
Vector ([f32, ...])HNSW indexEmbedding similarity search
Geo pointSpatial indexPoints, distance queries
MapNested documentConfig, structured data
Bytes/BlobBlobStoreLarge binary objects

Indexes

CoordiNode maintains indexes when you create them:

cypher
-- Exact property index (B-tree in LSM) — implemented
CREATE INDEX :Person(email)

-- Full-text index (Tantivy) — implemented
CREATE TEXT INDEX doc_body ON :Document(body)
  OPTIONS {analyzer: "english"}

Note: Vector index DDL (CREATE VECTOR INDEX) is currently available via the programmatic API (Database::create_vector_index()). Cypher DDL syntax is planned.

EXPLAIN SUGGEST analyzes a query and recommends missing indexes. Available via gRPC or, when running Docker, via the REST proxy on port 7081:

bash
curl -X POST http://localhost:7081/v1/query/cypher/explain \
  -H "Content-Type: application/json" \
  -d '{"query": "MATCH (u:User) WHERE u.email = $e RETURN u", "parameters": {}}'

Transactions and MVCC

All reads and writes are wrapped in MVCC (Multi-Version Concurrency Control) transactions with Snapshot Isolation. See MVCC Transactions for details.

Next Step