When comparing PostgreSQL vs OrientDB, the Slant community recommends PostgreSQL for most people. In the question“What are the best databases to use for Node.js applications?” PostgreSQL is ranked 1st while OrientDB is ranked 12th. The most important reason people chose PostgreSQL is:
PostgreSQL is known to have a very holistic approach to robustness and data integrity which is reflected by it being fully [ACID](https://en.wikipedia.org/wiki/ACID) compliant. PostgreSQL has always been strict about making sure data is valid before allowing it into the database, and there is no way for a client to bypass those checks. Depending on your requirements, ACID compliance might be important.
Ranked in these QuestionsQuestion Ranking
Pro Fully ACID compliant
PostgreSQL is known to have a very holistic approach to robustness and data integrity which is reflected by it being fully ACID compliant.
PostgreSQL has always been strict about making sure data is valid before allowing it into the database, and there is no way for a client to bypass those checks.
Depending on your requirements, ACID compliance might be important.
Pro High performance
PostgreSQL performance increases with each release, this is also proven by many benchmark tests.
Notable performance features include:
As PostgreSQL only supports one storage engine, it has been able to integrate and optimise it and with the rest of the database. This has resulted in multiple benefits such as the ability to allow different transaction types to co-exist efficiently without the need to select storage engine types once for each table ahead of time.
On the fly data compression resulting in less IO required for reading.
Asynchronous + synchronous Replication.
PostgreSQL supports a asynchronous API for use by client applications. It is reported to increase performance by up to 40% and is not supported by MySQL.
Designed to scale very well with large numbers of cores at high concurrency levels.
Pro Strong community
PostgreSQL has a strong community backing it, with guides, tutorials and support for any kind of problem a developer may have.
Pro Support for JSON data type
JSON data can be stored as a column with optional indexes. In 9.4 (upcoming at the time of this writing), JSONB will be a binary version of JSON that will save space. It's like the best of the NO-SQL world without having to give up ACID and Relationships. This means that cascading deletes can be done in a single Transaction across multiple JSON documents.
Pro Actively developed
Regular fixes and features are released
Pro Support for geographic objects
PostgreSQL can be extended to have geographic object support through PostGIS and allows for location queries to be run through SQL.
Pro Multiple node packages available
There are many packages (like Sequelize) that integrate deeply with the features Postgres offers.
Pro Support Perl and Python for coding stored procedures
Postgres supports popular languages for coding stored procedures, such as Perl and Python. So, you can fairly easy transform just DB-server to reliable Service with complex business logic.
Pro Open Source, powerful and on par with other paid RDBMS'
It is a powerful, open source product that has all the bells and whistles when compared with its costly, proprietary counterparts.
Pro Multi-model database (document, object, graph)
This database is primarily, or historically, thought of as a graph database. However, it is actually a multi-model database that supports a variety of noSQL models (key-value, document, etc.).
Pro Open Source commercial friendly license (Apache 2)
The Apache 2 license is one of the most liberal licenses. You can use OrientDB for any purpose for free.
Pro Free clustering support
Unlike other NoSql databases, OrientDB offers clustering support for free. Furthermore, it's not a basic Master/Slave, but it supports Master-Master replication + Sharding.
Pro Distributed Graph Database with relational type Documents
Pro Supports sql as well as other query languages
It can be queried in a number of ways, but the ability to query with SQL makes it a bit more familiar to use.
Pro Multi-master replication
OrientDB is incredibly scalable thanks to its multi-master replication. All nodes in a cluster can both read and write.
Pro Full text search
Full text search support is available when using Lucene based indexing algorithm.
OrientDB is very fast, especially when it comes to relationships between records (or "links").
Pro Enterprise version available
The Community Edition is free and covers many features, but an Enterprise Edition is available (prices are transparent, published online) with 24x7 support.
Con Not suited for small apps
Because of it's complexity and power, it may be an overkill to use PostgreSQL in small applications that will not make use of it's full power.
Con Not well known
It's a very unfortunate thing, but it's true. Not many people know of this gem so that makes it difficult to find community support at times. It also makes it hard to get people on board with it who shop products by brand name or flashy marketing. It also means there are fewer code snippets, libraries, and frameworks that consider it. While it's interoperability is good with SQL support and Tinkerpop, it still doesn't change the fact that many things don't give it much thought and that can lead to more work as a developer sometimes.
Con Learning curve
A lot of effort went into making OrientDB easy and familiar to use (such as SQL queries for example). However, it's important to understand the database engine a bit and how it works in general (links for example). This involves a bit of a learning curve if you're not familiar with graph databases. Not an enormous curve or anything, but it's still a consideration.
Con Bulk inserts may cause an out of memory crash
When doing inserts in OrientDB you have to be careful to do them one at a time. Bulk inserts may cause
out of memory error.