MongoDB vs PostgreSQL vs RocksDB

Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

MongoDB
MongoDB

15.6K
12.1K
+ 1
3.8K
PostgreSQL
PostgreSQL

15.9K
11.9K
+ 1
3.4K
RocksDB
RocksDB

43
51
+ 1
10

What is MongoDB?

MongoDB stores data in JSON-like documents that can vary in structure, offering a dynamic, flexible schema. MongoDB was also designed for high availability and scalability, with built-in replication and auto-sharding.

What is PostgreSQL?

PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions.

What is RocksDB?

RocksDB is an embeddable persistent key-value store for fast storage. RocksDB can also be the foundation for a client-server database but our current focus is on embedded workloads. RocksDB builds on LevelDB to be scalable to run on servers with many CPU cores, to efficiently use fast storage, to support IO-bound, in-memory and write-once workloads, and to be flexible to allow for innovation.
Get Advice Icon

Need advice about which tool to choose?Ask the StackShare community!

Why do developers choose MongoDB?
Why do developers choose PostgreSQL?
Why do developers choose RocksDB?

Sign up to add, upvote and see more prosMake informed product decisions

What are the cons of using MongoDB?
What are the cons of using PostgreSQL?
What are the cons of using RocksDB?
    Be the first to leave a con
    What companies use MongoDB?
    What companies use PostgreSQL?
    What companies use RocksDB?

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with MongoDB?
    What tools integrate with PostgreSQL?
    What tools integrate with RocksDB?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    What are some alternatives to MongoDB, PostgreSQL, and RocksDB?
    Amazon DynamoDB
    All data items are stored on Solid State Drives (SSDs), and are replicated across 3 Availability Zones for high availability and durability. With DynamoDB, you can offload the administrative burden of operating and scaling a highly available distributed database cluster, while paying a low price for only what you use.
    Couchbase
    Developed as an alternative to traditionally inflexible SQL databases, the Couchbase NoSQL database is built on an open source foundation and architected to help developers solve real-world problems and meet high scalability demands.
    MySQL
    The MySQL software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software.
    Cassandra
    Partitioning means that Cassandra can distribute your data across multiple machines in an application-transparent matter. Cassandra will automatically repartition as machines are added and removed from the cluster. Row store means that like relational databases, Cassandra organizes data by rows and columns. The Cassandra Query Language (CQL) is a close relative of SQL.
    Elasticsearch
    Elasticsearch is a distributed, RESTful search and analytics engine capable of storing data and searching it in near real time. Elasticsearch, Kibana, Beats and Logstash are the Elastic Stack (sometimes called the ELK Stack).
    See all alternatives
    Decisions about MongoDB, PostgreSQL, and RocksDB
    No stack decisions found
    Interest over time
    Reviews of MongoDB, PostgreSQL, and RocksDB
    No reviews found
    How developers use MongoDB, PostgreSQL, and RocksDB
    Avatar of AngeloR
    AngeloR uses PostgreSQLPostgreSQL

    We use postgresql for the merge between sql/nosql. A lot of our data is unstructured JSON, or JSON that is currently in flux due to some MVP/interation processes that are going on. PostgreSQL gives the capability to do this.

    At the moment PostgreSQL on amazon is only at 9.5 which is one minor version down from support for document fragment updates which is something that we are waiting for. However, that may be some ways away.

    Other than that, we are using PostgreSQL as our main SQL store as a replacement for all the MSSQL databases that we have. Not only does it have great support through RDS (small ops team), but it also has some great ways for us to migrate off RDS to managed EC2 instances down the line if we need to.

    Avatar of Cloudcraft
    Cloudcraft uses PostgreSQLPostgreSQL

    PostgreSQL combines the best aspects of traditional SQL databases such as reliability, consistent performance, transactions, querying power, etc. with the flexibility of schemaless noSQL systems that are all the rage these days. Through the powerful JSON column types and indexes, you can now have your cake and eat it too! PostgreSQL may seem a bit arcane and old fashioned at first, but the developers have clearly shown that they understand databases and the storage trends better than almost anyone else. It definitely deserves to be part of everyone's toolbox; when you find yourself needing rock solid performance, operational simplicity and reliability, reach for PostgresQL.

    Avatar of Brandon Adams
    Brandon Adams uses PostgreSQLPostgreSQL

    Relational data stores solve a lot of problems reasonably well. Postgres has some data types that are really handy such as spatial, json, and a plethora of useful dates and integers. It has good availability of indexing solutions, and is well-supported for both custom modifications as well as hosting options (I like Amazon's Postgres for RDS). I use HoneySQL for Clojure as a composable AST that translates reliably to SQL. I typically use JDBC on Clojure, usually via org.clojure/java.jdbc.

    Avatar of Tarun Singh
    Tarun Singh uses MongoDBMongoDB

    Used MongoDB as primary database. It holds trip data of NYC taxis for the year 2013. It is a huge dataset and it's primary feature is geo coordinates with pickup and drop off locations. Also used MongoDB's map reduce to process this large dataset for aggregation. This aggregated result was then used to show visualizations.

    Avatar of Trello
    Trello uses MongoDBMongoDB

    MongoDB fills our more traditional database needs. We knew we wanted Trello to be blisteringly fast. One of the coolest and most performance-obsessed teams we know is our next-door neighbor and sister company StackExchange. Talking to their dev lead David at lunch one day, I learned that even though they use SQL Server for data storage, they actually primarily store a lot of their data in a denormalized format for performance, and normalize only when they need to.

    Avatar of Foursquare
    Foursquare uses MongoDBMongoDB

    Nearly all of our backend storage is on MongoDB. This has also worked out pretty well. It's enabled us to scale up faster/easier than if we had rolled our own solution on top of PostgreSQL (which we were using previously). There have been a few roadbumps along the way, but the team at 10gen has been a big help with thing.

    Avatar of ReviewTrackers
    ReviewTrackers uses PostgreSQLPostgreSQL

    PostgreSQL is responsible for nearly all data storage, validation and integrity. We leverage constraints, functions and custom extensions to ensure we have only one source of truth for our data access rules and that those rules live as close to the data as possible. Call us crazy, but ORMs only lead to ruin and despair.

    Avatar of Jeff Flynn
    Jeff Flynn uses PostgreSQLPostgreSQL

    Tried MongoDB - early euphoria - later dread. Tried MySQL - not bad at all. Found PostgreSQL - will never go back. So much support for this it should be your first choice. Simple local (free) installation, and one-click setup in Heroku - lots of options in terms of pricing/performance combinations.

    Avatar of AngeloR
    AngeloR uses MongoDBMongoDB

    We are testing out MongoDB at the moment. Currently we are only using a small EC2 setup for a delayed job queue backed by agenda. If it works out well we might look to see where it could become a primary document storage engine for us.

    Avatar of Matt Welke
    Matt Welke uses MongoDBMongoDB

    Used for proofs of concept and personal projects with a document data model, especially with need for strong geographic queries. Often not chosen in long term apps due to chance data model can end up relational as needs develop.

    How much does MongoDB cost?
    How much does PostgreSQL cost?
    How much does RocksDB cost?
    Pricing unavailable
    Pricing unavailable