OrientDB and Neo4j* share many features, but the engines are fundamentally different. While Neo4j is a pure Graph Database, OrientDB has a hybrid Document-Graph engine that adds some compelling features to the Graph Database model.
This page will outline only the most important differences.
Many make the mistake of assuming that Neo4j is free because it’s open source. This is a quote from their official website: “Simply, if you are open source, then Neo4j is open source; if you are closed source, then Neo4j is commercial” – Fair Trade Software Licensing – A Guide To Licensing Options For Neo4j. In the 2014 Gartner report, Neo4j’s referenced customers identified Neo’s pricing model as an issue.
It takes a lot of effort to fully understand the Neo4j pricing and licensing model. They have two product versions with a very different feature set. Community Edition, which lacks clustering (fault tolerance), advanced caching and other important production features is GPL. Enterprise edition is available under AGPL or a paid subscription license.
In our experience, we’ve found enterprise users aren’t receptive to (A)GPL. There are too many grey areas interpreting a derivative work and they aren’t willing to risk polluting their closed source code with an AGPL license.
We opted for the completely permissive Apache 2 Open Source license on our Community Edition. Free for any purpose! We also didn’t disable the features allowing horizontal scale and fault tolerance. Cluster, shard and replicate until your heart is content. Let your free use project expand globally without the fear of license restrictions. Oh, almost forgot, you can embed our database as well. Try that with (A)GPL!
When it comes to pricing, we take a step forward. Not only is OrientDB Enterprise a fraction of the cost compared to Neo4J. We also utilize your resources in a more effective way. Neo4j allows only one database per server. OrientDB can host several databases per instance. We make our pricing EASY and PUBLIC. Discounts are deep for large deployments and we gladly work with OEMs on distribution friendly licenses.
|Features & Capabilities||OrientDB Community||Neo4j Community|
|TinkerPop Standard Compliance
|Document Database Features|
|Record Level Security|
|User and Role Security|
|Custom Data Types|
|Elastic Scalability with Zero Configuration|
|Native HTTP Rest/JSON|
|Commercial Friendly License|
|Embeddable with No Restrictions|
Most NoSQL solutions, like Neo4j, are used just as “cache” to speed up certain use cases, while the master database remains a Relational DBMS. In the 2014 Gartner report, Neo4j’s referenced customers expressed dissatisfaction with the product’s High Availability/Disaster Recovery capabilities.
Most NoSQL products are focused on performance and scalability, while sacrificing reliability. Users don’t perceive a NoSQL DBMS as reliable as a Relational DBMS.
OrientDB, however, isn’t the average NoSQL DBMS. Thanks to WAL (Write Ahead Logging), OrientDB is able to restore the database content after a crash. Any pending transactions are automatically rolled back. Your precious data is in a safe place.
For this reason, OrientDB was the first graph database to ever appear on Gartner’s Operational DBMS Magic Quadrant in 2013.
Gartner, Magic Quadrant for Operational Database Management System, Donald Feinberg, et al, October 21, 2013.
Neo4j supports replication, but this is an Enterprise feature not released in the FREE Open Source Community Edition. Furthermore, the replication follows the Master/Slave architecture with a huge bottleneck on write operations: only one server can be the master, so the Neo4j write throughput is limited to the capacity of the single Master server. This means that Neo4j isn’t able to scale on writes.
OrientDB, instead, supports a Multi-Master + Sharded architecture: all the servers are masters. The throughput is not limited by a single server. With OrientDB, the global throughput is the sum of the throughput of all the servers.
This is also called Linear Scalability.
OrientDB’s query language is built on SQL and is augmented with a few extensions to manipulate trees and graphs. Considering most developers are familiar with SQL, working with OrientDB is just easier.
SELECT name, out(‘ACTS’).title
Neo4j doesn’t support a proper schema against Vertex and Edges, but only the “label” concept to group vertices and edges of the same type. No inheritance, no polymorphism and no complex constraints, but only the uniqueness of values by using indexes.
OrientDB, instead, supports the creation of schemas around graphs. Furthermore, the true inheritance and polymorphism allow you to create subclasses of Vertex and Edge. For example, you can have “Customer” and “Provider” that extend the common vertex class “Account” by inheriting all of the fields. By using the schema, you can also setup complex constraints against vertices and edges properties.
While OrientDB supports a rich set of types, Neo4 supports only primitive types. With Neo4j, it’s not possible to store decimal numbers (amounts, currencies, salaries, etc.) without loosing precision, because “float” and “double” Java types use the floating point technique. OrientDB, instead, provides the “decimal” type to handle numbers with no precision lost.
The same is for dates. Neo4j has no direct support for date types, so the management of temporal data is the responsibility of the developer that must convert it into milliseconds from 1970. OrientDB, instead, provides DATE and DATETIME types to handle dates easily.
OrientDB supports other complex types such as Binary to store BLOB (Binary Large Objects), Embedded to store embedded objects recursively, Collections and Maps.
One of the most important features of an Operational DBMS is that it shouldn’t require a restart or down-time for maintenance. Neo4j isn’t able to automatically reclaim the space of deleted records and it requires a complete restart of the server. In comparison, OrientDB automatically reuses the freed space and such operations are transparent and occur while the server is online.
*Neo4j is a registered trademark of Neo Technology Inc.
**Gartner, Magic Quadrant for Operational Database Management System, Donald Feinberg, et al, October 21, 2013.