

PostgreSQL is a traditional RDBMS (relational database management system) SQL database, like Oracle and MySQL. In this article, we compare MongoDB and PostgreSQL.
Mongodb or postgresql full#
Postgres providing NoSQL capabilities along with full transaction support, storing JSON documents with constraints on the fields data. It also runs on your choice of hardware and operating system. The underlying engine is very stable and copes well with a good range of data volumes. On the other hand, we can use all SQL features for other types of data. We can store data into JSONB with constraints, consistency and speed. The biggest advantage of staying with Postgres is that we have best of both worlds. Postgres is open source, faster, ACID compliant and uses less memory on disk, and is all around good performant for JSON storage also and includes full serializability of transactions with 3 levels of transaction isolation. Postgres is recommended if your future applications have a complicated schema that needs lots of joins or all the data have relations or if we have heavy writing.

My experience with Postgres and Mongo after working with both the databases in my projects. Should I continue with MongoDB and eventually hope for its RoR ODM (Mongoid) to fully mature, or should I consider using PostgreSQL?ġ) Which one would be more suitable for developing a social networking site similar to Facebook.Ģ) Which one would be more suitable for 4-page standard layout type of website (Home, Products, About, Contact) Some say, some apps are more suitable with one or the other type of db. One with PostgreSQL and the other with MongoDB. Only because I can join tables and do anything with the data. Documentation was good, but again, at times I found the ODM to be very limiting compared to what Active Record offered with traditional (SQL) database systems.Įven to this date, I feel more comfortable working with PostgreSQL than MongoDB. Moreover, I am using Ruby on Rails 3, and an ODM called Mongoid. Especially, when I had to join several tables to calculate some logic. However, I found certain queries I was doing in PostgreSQL, I couldn't do efficiently in MongoDB. After a few weeks, I migrated the whole system to MongoDB. After reading about MongoDB, I was interested to see how the app would work with it. I've got an app fully working with PostgreSQL.
