Native property graph capabilities built into Absolute DB. Create relationships, traverse graphs, run analytics, and combine graph with vector search — all in SQL, all transactional.
Absolute DB embeds a full property graph engine inside the same process as the SQL and vector engines. Graph relationships share the same MVCC transaction layer as relational tables — a single transaction can create a relationship, insert a row, and update a vector simultaneously.
| Metric | Current |
|---|---|
| Edge creates/sec | 1.25 million |
| Graph traversals/sec | 1.3 billion |
| Max edges per node | 16,384 |
| Shortest path algorithm | Dijkstra + A* |
| BFS/DFS | Configurable max depth |
Use RELATE to create a directed relationship (edge) between two nodes. Edge types label the kind of relationship, and optional properties carry arbitrary key-value metadata.
-- Basic relationship between two nodes
RELATE 101 → 202 AS follows;
-- Relationship with properties
RELATE 101 → 202 AS follows
PROPERTIES { since: '2026-01-15', strength: 0.9 };
-- Relationship between named nodes
RELATE user:alice → user:bob AS knows
PROPERTIES { since: '2024-06-01', weight: 1.0 };
-- Undirected relationship (creates edges in both directions)
RELATE product:1001 ↔ product:1002 AS similar
PROPERTIES { score: 0.87 };
-- Bulk edge creation from a subquery
RELATE (SELECT id FROM users WHERE active = true) → 9999 AS member_of;
-- Who does user 101 follow?
SELECT target_id, properties->>'since' AS since
FROM graph_edges
WHERE source_id = 101 AND edge_type = 'follows';
-- Delete a relationship
UNRELATE 101 → 202 AS follows;
-- Count outgoing edges
SELECT count(*) FROM graph_edges WHERE source_id = 101;
Breadth-first search (BFS) and depth-first search (DFS) traversals are available as SQL functions. Both accept a starting node, edge type filter, and maximum depth limit.
-- BFS: find all nodes reachable from node 101 within 3 hops
SELECT node_id, depth, path
FROM graph_bfs(
start => 101,
edge_type => 'follows',
max_depth => 3
);
-- DFS: depth-first traversal for hierarchical data
SELECT node_id, depth, path
FROM graph_dfs(
start => 1,
edge_type => 'parent_of',
max_depth => 10
);
-- Find all paths between two nodes
SELECT path, path_length
FROM graph_all_paths(
from_id => 101,
to_id => 999,
edge_type => 'follows',
max_depth => 5
)
ORDER BY path_length
LIMIT 20;
-- Count hops (degree of separation)
SELECT graph_distance(101, 999, edge_type => 'follows') AS hops;
The GRAPH SHORTEST_PATH statement uses Dijkstra's algorithm for unweighted graphs and A* with a supplied heuristic for weighted graphs. Edge weights can be any numeric property.
-- Unweighted shortest path (Dijkstra)
GRAPH SHORTEST_PATH FROM 101 TO 999 EDGE follows;
-- Returns: path (array of node IDs), total_hops, edges_traversed
-- Weighted shortest path (Dijkstra with weight property)
GRAPH SHORTEST_PATH FROM 'city:sydney' TO 'city:perth'
EDGE route
WEIGHT distance_km;
-- A* with heuristic for geographic graphs
GRAPH SHORTEST_PATH FROM 'node:A' TO 'node:Z'
EDGE road
WEIGHT travel_time
HEURISTIC haversine;
-- Bidirectional shortest path (faster for long paths)
SELECT * FROM graph_bidirectional_shortest_path(
from_id => 101,
to_id => 99999,
edge_type => 'transaction',
weight => 'amount'
);
Absolute DB includes built-in implementations of the most widely used graph analytics algorithms. All run in-database without exporting data to an external graph processing system.
PageRank assigns an importance score to each node based on the number and quality of incoming edges. Widely used for ranking web pages, identifying influential users in social networks, and scoring entities in knowledge graphs.
-- Compute PageRank for all nodes in a graph
SELECT node_id, pagerank_score
FROM absdb_graph_pagerank(
edge_type => 'follows',
damping => 0.85,
iterations => 20,
tolerance => 1e-6
)
ORDER BY pagerank_score DESC
LIMIT 100;
The Louvain algorithm detects communities (clusters) in a graph by maximising modularity. Useful for segmenting users in a social graph, identifying fraud rings, and grouping related entities in a knowledge graph.
-- Detect communities using Louvain algorithm
SELECT node_id, community_id, modularity_contribution
FROM absdb_graph_louvain(
edge_type => 'interacts_with',
resolution => 1.0
)
ORDER BY community_id, node_id;
Betweenness centrality measures how often a node appears on the shortest path between two other nodes. High-centrality nodes are critical chokepoints — removing them has the most impact on graph connectivity.
-- Compute betweenness centrality (top 50 most central nodes)
SELECT node_id, betweenness_score
FROM absdb_graph_betweenness(
edge_type => 'transaction',
normalised => true
)
ORDER BY betweenness_score DESC
LIMIT 50;
Both nodes and edges can carry arbitrary key-value properties stored as JSONB. Properties are fully queryable with standard SQL JSON operators and can be indexed with GIN for fast access.
-- Filter edges by property value
SELECT source_id, target_id, properties
FROM graph_edges
WHERE edge_type = 'transaction'
AND (properties->>'amount')::numeric > 10000
AND (properties->>'currency') = 'AUD';
-- Index edge properties for fast filtering
CREATE INDEX idx_edges_amount
ON graph_edges USING GIN (properties)
WHERE edge_type = 'transaction';
-- Update edge properties
UPDATE graph_edges
SET properties = properties || '{"flagged": true}'::jsonb
WHERE source_id = 101 AND target_id = 202
AND edge_type = 'transaction';
VecGraph enables combined queries that traverse the graph structure and filter by vector similarity simultaneously. This is the foundation for knowledge graph retrieval, semantic recommendation, and contextual AI memory — finding nodes that are both close in the graph and similar in semantic meaning.
-- Find graph neighbours of node 101 that are semantically similar to a query
SELECT n.id, n.name, n.embedding <=> $1 AS semantic_distance
FROM graph_neighbours(101, edge_type => 'related_to', max_depth => 2) AS g
JOIN entities n ON n.id = g.node_id
WHERE n.embedding <=> $1 < 0.3 -- semantic similarity threshold
ORDER BY semantic_distance
LIMIT 10;
-- Knowledge graph + vector: find concepts related to a query AND semantically close
SELECT * FROM absdb_vecgraph_search(
start_node => 'concept:machine_learning',
query_vec => EMBED('minilm', 'neural network training'),
edge_type => 'related_to',
max_hops => 3,
vec_cutoff => 0.25,
top_k => 20
);
Absolute DB includes a native openCypher parser that compiles Cypher queries directly to calls on the underlying graph engine — no separate graph database, no bridge, no translator. This covers approximately 90% of real-world Cypher queries seen in Neo4j migrations.
| Cypher feature | Supported |
|---|---|
MATCH (n:Label {prop:val})-[:REL]->(m:Label) pattern match | ✓ |
CREATE (n:Label {props}) / CREATE (a)-[:REL]->(b) | ✓ |
MERGE (n:Label {id:val}) SET n.name = val | ✓ |
DELETE n / DETACH DELETE n | ✓ |
WHERE cond RETURN ... with predicates and aggregates | ✓ |
WITH n, count(*) AS cnt WHERE cnt > 5 (pipelining) | ✓ |
OPTIONAL MATCH | ✓ |
UNWIND list AS x | ✓ |
Variable-length paths (a)-[*1..5]->(b) | ✓ |
| Gremlin / GQL dialect parsers | Roadmap v8.3 |
-- Find accounts that transferred money through a 2-hop path back to themselves
MATCH (a:Account)-[:TRANSFER]->(b:Account)-[:TRANSFER]->(c:Account)
WHERE a.id = c.id AND a.id <> b.id
RETURN a.id AS account, b.id AS middleman, count(*) AS cycle_count
ORDER BY cycle_count DESC
LIMIT 20;
openCypher queries execute against the same storage, same transactions, and same RBAC as SQL queries — no separate configuration. Neo4j clients that speak the Cypher query language (not the Bolt wire protocol) can be migrated by replaying their queries through Absolute DB's Cypher endpoint.
| Property | Current |
|---|---|
| Max edges per node | 16,384 |
| Max edge types | Unlimited |
| Max property key length | 256 bytes |
| Max property value size | 16 MB (JSONB) |
| Nodes per graph | Limited only by storage |
| Use Case | Graph Pattern |
|---|---|
| Fraud detection | Betweenness centrality + BFS ring detection; suspicious transaction rings |
| Recommendation engines | BFS from user → item graph; collaborative filtering via graph traversal |
| Social graphs | Degree of separation (hops); community detection; influence scoring (PageRank) |
| Knowledge graphs / AI memory | VecGraph: semantic similarity + relationship traversal |
| Supply chain / logistics | Shortest path with weighted edges (cost, distance, time) |
| Identity resolution | BFS cluster expansion from known entity; property matching |
| Network topology analysis | Critical path identification; node criticality via betweenness |
~154 KB binary · zero external dependencies · 2,737 tests passing · SQL:2023 100%