Getting Started

Tutorial: Building with CleaveDB

Graph Traversal — Overview

Once relationships between documents are established with LINK, the real power of a graph database lies in navigation. CleaveDB provides native graph traversal primitives that follow physical bond pointers directly in memory, bypassing the costly multi-table joins and recursive Common Table Expressions (CTEs) required by traditional databases.

CleaveQL offers several expressive traversal paradigms tailored for different analytical and operational questions:

  • Neighborhood Exploration (FOLLOW): Performs a Breadth-First Search (BFS) to discover all connected documents within a given radius.
  • Sequential Chains (TRACE): Walks an explicit ordered sequence of bond types (e.g., manager → mentor → team).
  • Pattern Syntax (MATCH & VIA): Employs Cypher-style ASCII graph notation ((u FROM users)-["friend"]->(f FROM users)) and conversational edge traversal (LINKED VIA "label" TO/FROM/WITH).
  • Direction & Depth Controls: Restricts graph walks by edge orientation (OUTGOING, INCOMING, or BOTH) and sets maximum traversal horizons.
  • Neuro-Symbolic Pathfinding: Blends symbolic graph traversal with neural transformer embeddings, dynamically pruning branches that do not match semantic concepts using AVX-512 SIMD instructions.

Explore the Graph Traversal topics

Each lesson provides practical CleaveQL queries and guidance for navigating document graphs: