AIngle Graph - Native Semantic GraphDB
A high-performance triple store designed for the AIngle distributed ledger. Unlike traditional key-value stores, AIngle Graph stores semantic triples (Subject-Predicate-Object) with native indexing for efficient queries.
Architecture
┌─────────────────────────────────────────────────────────────┐
│ AIngle Graph │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Query Engine │ │
│ │ Pattern Matching │ Traversal │ SPARQL-like queries │ │
│ └──────────────────────────────────────────────────────┘ │
│ │ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Triple Store │ │
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │
│ │ │ SPO │ │ POS │ │ OSP │ Indexes │ │
│ │ └─────────┘ └─────────┘ └─────────┘ │ │
│ └──────────────────────────────────────────────────────┘ │
│ │ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Storage Backends │ │
│ │ Sled (default) │ RocksDB │ SQLite │ Memory │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
Quick Start
use ;
// Create a new graph database
let db = memory?;
// Insert a triple
let triple = new;
db.insert?;
// Query the graph
let results = db.query
.subject
.execute?;
# Ok::
Semantic Triples
A triple represents a fact in the form:
[Subject] --[Predicate]--> [Object]
Example:
[user:alice] --[has_title]--> "Doctor"
[user:alice] --[works_at]--> [org:hospital_xyz]
[org:hospital_xyz] --[located_in]--> "Mexico City"