Skip to content

Graph Database: Migration from Neo4j

Graph Database: Migration from Neo4j

Part of: Graph Database User Guide


Compatibility Matrix

FeatureNeo4jHeliosDBNotes
Cypher Query LanguageFullCoreBasic patterns, WHERE, RETURN
Bolt ProtocolUse Neo4j drivers
Graph AlgorithmsPageRank, centrality, community
ACID TransactionsSnapshot isolation
IndexesLabel and property indexes
Constraints⚠ PartialUnique constraints planned
Full-text Search🔄 PlannedV6.6
Spatial Queries🔄 PlannedV6.7
Temporal TypesVia properties
User-Defined Procedures🔄 PlannedV6.8

Legend: Supported | ⚠ Partial | 🔄 Planned | ❌ Not supported

Export from Neo4j

Using APOC Export

// Export to JSON
CALL apoc.export.json.all("export.json", {})
// Export to CSV
CALL apoc.export.csv.all("export.csv", {})
// Export specific subgraph
MATCH (p:Person)-[r:FRIEND_OF]->(f:Person)
CALL apoc.export.json.data([p, f], [r], "friends.json", {})
YIELD file, nodes, relationships
RETURN file, nodes, relationships

Using Cypher Shell

Terminal window
# Export to Cypher statements
cypher-shell -u neo4j -p password \
"MATCH (n) RETURN n LIMIT 10000" > nodes.cypher
cypher-shell -u neo4j -p password \
"MATCH ()-[r]->() RETURN r LIMIT 10000" > edges.cypher

Import to HeliosDB

Import from JSON

use serde_json::Value;
use std::fs::File;
use std::io::BufReader;
// Read Neo4j export
let file = File::open("export.json")?;
let reader = BufReader::new(file);
let data: Vec<Value> = serde_json::from_reader(reader)?;
// Import nodes
for item in data {
if item["type"] == "node" {
let node = Node {
id: 0,
label: item["labels"][0].as_str().unwrap().to_string(),
properties: item["properties"].as_object().unwrap().clone().into_iter()
.map(|(k, v)| (k, v.clone()))
.collect(),
};
storage.add_vertex(node).await?;
}
}
// Import relationships
for item in data {
if item["type"] == "relationship" {
let edge = Edge {
id: 0,
source: item["start"]["id"].as_u64().unwrap(),
target: item["end"]["id"].as_u64().unwrap(),
label: item["label"].as_str().unwrap().to_string(),
weight: 1.0,
properties: item["properties"].as_object().unwrap().clone().into_iter()
.map(|(k, v)| (k, v.clone()))
.collect(),
};
storage.add_edge(edge).await?;
}
}

Bulk Import Tool

Terminal window
# Use HeliosDB bulk import tool
heliosdb-import \
--format neo4j-json \
--input export.json \
--graph social_network \
--batch-size 10000

Query Translation

Neo4j Cypher → HeliosDB

Most Cypher queries work as-is. Some differences:

-- Neo4j: CREATE with MERGE
MERGE (p:Person {name: 'Alice'})
-- HeliosDB: Use add_vertex API
-- (CREATE support in roadmap)
-- Neo4j: OPTIONAL MATCH
MATCH (p:Person)
OPTIONAL MATCH (p)-[:FRIEND_OF]->(f)
RETURN p, f
-- HeliosDB: Use LEFT JOIN pattern
-- (OPTIONAL MATCH planned for V6.6)

Performance Comparison

Based on benchmarks with 1M node, 5M edge graph:

OperationNeo4j 5.xHeliosDB 6.5Speedup
6-degree BFS245ms78ms3.1x faster
Shortest path (Dijkstra)32ms15ms2.1x faster
PageRank (20 iter)980ms890ms1.1x faster
Node lookup1.2Ξs0.4Ξs3x faster
Bulk insert180K/sec500K/sec2.8x faster
Memory usage15.2GB9.6GB37% less

Conclusion: HeliosDB is 2-3x faster for most operations with lower memory footprint.




Version: 6.5 Last Updated: November 17, 2025