← Home

sutraDB Theory

Interactive visualizations of database theory — from how graph and vector databases work individually, to the innovations that make sutraDB different.

Background: How Databases Work

How Graph Databases Work
SPARQL traverses RDF triples to answer multi-hop relationship queries. Watch a query find great-grandfathers step by step.
RDFSPARQL
How Vector Databases Work
HNSW graph traversal finds nearest neighbors by hopping through hierarchical layers. See greedy search in action.
HNSWEmbeddings
Traditional Hybrid Databases
The clunky handoff when a vector database and graph database are bolted together through JSON documents.
System BoundariesJSON Handoff
sutraDB: Unified Vector-Graph
Interleaved traversal — graph hops happen during the vector search, not after it. One graph, zero context switches.
sutraDBInterleaved Traversal

Innovations

Implementing HNSW in RDF
Vectors as typed RDF literals, HNSW neighbors as virtual triples. The vector index becomes the 4th index alongside SPO/POS/OSP, queryable by SPARQL.
Novelsutra:f32vecsutra:hnswNeighbor
Subgraph Indexing for SIMD
Auto-discover repeated subgraph patterns and flatten them into columnar pseudo-tables. Turns multi-hop joins into SIMD-accelerated column scans.
NovelPseudo-TablesAVX2
PageRank Entry Points & Traversal Counters
Use PageRank to pick structurally important starting nodes, and runtime traversal counters to materialize adjacency lists for hot areas.
NovelAdaptive Indexing
SPARQL Exit Conditions (UNTIL)
Extend SPARQL property paths with per-step exit predicates. Terminate traversal early instead of exhaustively scanning the graph.
NovelSPARQL+