`

OrientDB: OrientDB vs Neo4j

 
阅读更多

http://www.orientechnologies.com/orientdb-vs-neo4j/

 

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.  

Price and Licensing

freeMany 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 underAGPL 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 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.

Modern, friendly business practices. Browse the pricing of our Production Support and Training services. We have nothing to hide.

 

Feature Matrix

Features & Capabilities OrientDB Community Neo4j Community
Graph Database yes yes
TinkerPop Standard Compliance
yes yes
ACID Transaction yes yes
Operational Database** yes  
Document Database Features yes  
Object-Oriented Concepts yes  
Record Level Security yes  
User and Role Security yes  
SQL yes  
Custom Data Types yes  
Embedded Documents yes  
Multi-Master Replication yes  
Sharding yes  
Elastic Scalability with Zero Configuration yes  
Server-Side Functions yes  
Native HTTP Rest/JSON yes  
Commercial Friendly License yes  
Embeddable with No Restrictions yes  

 

Operational DBMS

serversMost 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.

 

Scalability

scalabilityNeo4j 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.

 

Query Language

Neo4j has its own Query Language called “Cypher“- which requires training to learn a new language. 

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.

Look at the same query in OrientDB SQL vs Neo4j Cypher query languages to retrieve the actor’s name and their movies from the actor vertex:

OrientDB SQL

 

Neo4j Cypher

SELECT name, out(‘ACTS’).title
FROM Person WHERE name = ‘Robin’

VS

MATCH (actor:Person{name:’Robin’})-[:ACTS_IN]->(movie)
RETURN actor.name, movie.title

Complex Domains

flexible-domainNeo4j 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.

 

Complex Types

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.

 

Deleted Records

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.

 

Are you already using Neo4j?

Many clients have passed from Neo4j to OrientDB, join them! To try OrientDB, follow these 3 simple steps: Import from Neo4j to OrientDB.

To discover 10 key advantages of using OrientDB, take a look at Why OrientDB? If you need OrientDB support, consulting or training, pleasecontact us.


*Neo4j is a registered trademark of Neo Technology Inc.
**Gartner, Magic Quadrant for Operational Database Management System, Donald Feinberg, et al, October 21, 2013.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics