Top Related Projects
OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries.
🥑 ArangoDB is a native multi-model database with flexible data models for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions.
JanusGraph: an open-source, distributed graph database
high-performance graph database for real-time use cases
Apache TinkerPop - a graph computing framework
Quick Overview
Neo4j is a highly scalable, native graph database that leverages connected data to help companies build intelligent applications. It is designed to store, manage, and query highly connected data efficiently. Neo4j provides a powerful query language called Cypher for traversing graph data structures.
Pros
- High performance for connected data queries
- Flexible schema-less design
- ACID-compliant transactions
- Rich ecosystem of tools and integrations
Cons
- Steep learning curve for those new to graph databases
- Can be resource-intensive for very large datasets
- Limited support for complex aggregations compared to traditional relational databases
- Licensing costs for enterprise features
Code Examples
- Creating nodes and relationships:
CREATE (john:Person {name: 'John'})
CREATE (jane:Person {name: 'Jane'})
CREATE (john)-[:KNOWS]->(jane)
- Querying the graph:
MATCH (p:Person)-[:KNOWS]->(friend)
WHERE p.name = 'John'
RETURN friend.name
- Updating properties:
MATCH (p:Person {name: 'John'})
SET p.age = 30
RETURN p
Getting Started
- Download and install Neo4j from https://neo4j.com/download/
- Start the Neo4j server
- Open the Neo4j Browser at http://localhost:7474
- Connect to the database using the default credentials (username: neo4j, password: neo4j)
- Run your first Cypher query:
CREATE (n:Person {name: 'Alice'})
RETURN n
This creates a new node with the label 'Person' and a property 'name' set to 'Alice', then returns the created node.
Competitor Comparisons
OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries.
Pros of OrientDB
- Multi-model database supporting graph, document, key/value, and object models
- SQL-like query language for easier adoption by SQL developers
- Built-in support for clustering and sharding
Cons of OrientDB
- Smaller community and ecosystem compared to Neo4j
- Less mature and battle-tested in large-scale production environments
- Steeper learning curve due to multiple data models
Code Comparison
Neo4j (Cypher query):
MATCH (p:Person)-[:KNOWS]->(f:Person)
WHERE p.name = 'John'
RETURN f.name
OrientDB (SQL-like query):
SELECT out('KNOWS').name
FROM Person
WHERE name = 'John'
Both databases offer graph querying capabilities, but Neo4j's Cypher language is more graph-specific, while OrientDB's SQL-like syntax may be more familiar to developers with relational database experience. OrientDB's multi-model approach allows for more flexibility in data modeling, but Neo4j's focus on graph data can lead to better performance for pure graph use cases.
🥑 ArangoDB is a native multi-model database with flexible data models for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions.
Pros of ArangoDB
- Multi-model database supporting graphs, documents, and key-value pairs
- Flexible querying with AQL (ArangoDB Query Language)
- Built-in support for full-text search and geospatial queries
Cons of ArangoDB
- Less mature and smaller community compared to Neo4j
- Limited support for advanced graph algorithms out-of-the-box
- Steeper learning curve due to multi-model nature
Code Comparison
ArangoDB (AQL):
FOR user IN users
FILTER user.age > 30
RETURN user.name
Neo4j (Cypher):
MATCH (user:User)
WHERE user.age > 30
RETURN user.name
Both databases offer declarative query languages, but ArangoDB's AQL is more versatile for multi-model data, while Neo4j's Cypher is specifically designed for graph traversals.
ArangoDB excels in scenarios requiring flexibility across different data models, while Neo4j is better suited for pure graph-based applications with complex relationships and traversals. The choice between the two depends on the specific requirements of your project and the primary data model you'll be working with.
JanusGraph: an open-source, distributed graph database
Pros of JanusGraph
- Supports multiple storage backends (e.g., Apache Cassandra, HBase, Google Cloud Bigtable)
- Better scalability for distributed environments
- Open-source with Apache 2.0 license, allowing more flexibility for commercial use
Cons of JanusGraph
- Less mature ecosystem and community support compared to Neo4j
- Steeper learning curve and more complex setup
- Limited built-in visualization tools
Code Comparison
JanusGraph:
graph = JanusGraphFactory.open("conf/janusgraph-cassandra.properties");
GraphTraversalSource g = graph.traversal();
Vertex v1 = g.addV("person").property("name", "John").next();
Vertex v2 = g.addV("person").property("name", "Jane").next();
g.V(v1).addE("knows").to(v2).property("since", 2010).iterate();
Neo4j:
try (Driver driver = GraphDatabase.driver("bolt://localhost:7687", AuthTokens.basic("neo4j", "password"))) {
try (Session session = driver.session()) {
session.run("CREATE (a:Person {name: 'John'})-[:KNOWS {since: 2010}]->(b:Person {name: 'Jane'})");
}
}
Both JanusGraph and Neo4j are powerful graph databases, but they cater to different use cases. JanusGraph excels in distributed environments with large-scale data, while Neo4j offers a more user-friendly experience and a robust ecosystem for smaller to medium-sized graph applications.
high-performance graph database for real-time use cases
Pros of Dgraph
- Native GraphQL support, allowing for easier integration with GraphQL-based applications
- Designed for horizontal scalability, making it suitable for large-scale distributed systems
- Built-in support for full-text search and geospatial queries
Cons of Dgraph
- Smaller community and ecosystem compared to Neo4j
- Less mature and fewer enterprise-level features
- Limited support for complex graph algorithms out-of-the-box
Code Comparison
Dgraph query example:
{
user(func: eq(name, "Alice")) {
name
age
friends {
name
}
}
}
Neo4j query example (Cypher):
MATCH (u:User {name: "Alice"})
RETURN u.name, u.age, [(u)-[:FRIEND]->(f) | f.name] AS friends
Both examples retrieve a user named Alice, their age, and their friends' names. Dgraph uses GraphQL-like syntax, while Neo4j uses Cypher, its proprietary query language. Dgraph's query is more concise and familiar to GraphQL developers, while Neo4j's Cypher offers more flexibility for complex graph traversals.
Apache TinkerPop - a graph computing framework
Pros of TinkerPop
- More flexible and vendor-agnostic, supporting multiple graph databases
- Provides a standardized query language (Gremlin) across different graph systems
- Offers a wider range of graph computing capabilities, including OLAP
Cons of TinkerPop
- Steeper learning curve due to its more abstract nature
- Generally slower performance compared to Neo4j's native Cypher queries
- Less extensive documentation and community support
Code Comparison
Neo4j (Cypher):
MATCH (p:Person)-[:KNOWS]->(f:Person)
WHERE p.name = 'Alice'
RETURN f.name
TinkerPop (Gremlin):
g.V().has('name', 'Alice').out('knows').values('name')
Both examples find friends of Alice, but Neo4j's Cypher is more declarative, while TinkerPop's Gremlin is more imperative and traversal-based.
Summary
Neo4j is a purpose-built graph database with its own query language, offering better performance and ease of use for specific graph use cases. TinkerPop, on the other hand, provides a more flexible, vendor-agnostic approach to graph computing, supporting multiple backends and offering a standardized query language. The choice between them depends on specific project requirements, performance needs, and the desire for database lock-in versus flexibility.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
= Neo4j: Graphs for Everyone =
https://neo4j.com[Neo4j] is the world's leading Graph Database. It is a high performance graph store with all the features expected of a mature and robust database, like a friendly query language and ACID transactions. The programmer works with a flexible network structure of nodes and relationships rather than static tables -- yet enjoys all the benefits of enterprise-quality database. For many applications, Neo4j offers orders of magnitude performance benefits compared to relational DBs.
Learn more on the https://neo4j.com[Neo4j website].
== Using Neo4j ==
Neo4j is available both as a standalone server, or an embeddable component. You can https://neo4j.com/download/[download] or https://neo4j.com/sandbox/[try online].
== Extending Neo4j ==
We encourage experimentation with Neo4j. You can build extensions to Neo4j, develop library or drivers atop the product, or make contributions directly to the product core. You'll need to sign a Contributor License Agreement in order for us to accept your patches.
== Dependencies ==
Neo4j is built using https://maven.apache.org/[Apache Maven] version 3.8.2 and a recent version of supported VM. Bash and Make are also required. Note that maven needs more memory than the standard configuration, this can be achieved with export MAVEN_OPTS="-Xmx2048m"
.
macOS users need to have https://brew.sh/[Homebrew] installed.
=== With brew on macOS ===
brew install maven
Please note that we do not support building Debian packages on macOS.
=== With apt-get on Ubuntu ===
sudo apt install maven openjdk-17-jdk
Be sure that the JAVA_HOME
environment variable points to /usr/lib/jvm/java-17-openjdk-amd64
(you may have various java versions installed).
== Building Neo4j ==
Before you start running the unit and integration tests in the Neo4j Maven project on a Linux-like system, you should ensure your limit on open files is set to a reasonable value. You can test it with ulimit -n
. We recommend you have a limit of at least 40K.
- A plain
mvn clean install -T1C
will only build the individual jar files. - Test execution is, of course, part of the build.
- In case you just want the jars, without running tests, this is for you:
mvn clean install -DskipTests -T1C
. - You may need to increase the memory available to Maven:
export MAVEN_OPTS="-Xmx2048m"
(try this first if you get build errors).
== Running Neo4j ==
After running a mvn clean install
, cd
into packaging/standalone/target
and extract the version you want, then:
bin/neo4j-admin server start
in the extracted folder to start Neo4j on localhost:7474
. On Windows you want to run:
bin\neo4j-admin server start
instead.
== Neo4j Desktop ==
Neo4j Desktop is a convenient way for developers to work with local Neo4j databases.
To install Neo4j Desktop, go to https://neo4j.com/download-center/[Neo4j Download Center] and follow the instructions.
== Licensing ==
Neo4j Community Edition is an open source product licensed under GPLv3.
Neo4j Enterprise Edition includes additional closed-source components not available in this repository and requires a commercial license from Neo4j or one of its affiliates.
== Trademark ==
Neo4j's trademark policy is available at https://neo4j.com/trademark-policy/[our trademark policy page].
Top Related Projects
OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries.
🥑 ArangoDB is a native multi-model database with flexible data models for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript extensions.
JanusGraph: an open-source, distributed graph database
high-performance graph database for real-time use cases
Apache TinkerPop - a graph computing framework
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot