Mongoose vs PostgreSQL

Get Advice Icon

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

Mongoose
Mongoose

764
581
+ 1
38
PostgreSQL
PostgreSQL

16.4K
12.3K
+ 1
3.4K
Add tool

Mongoose vs PostgreSQL: What are the differences?

Mongoose: MongoDB object modeling designed to work in an asynchronous environment. Let's face it, writing MongoDB validation, casting and business logic boilerplate is a drag. That's why we wrote Mongoose. Mongoose provides a straight-forward, schema-based solution to modeling your application data and includes built-in type casting, validation, query building, business logic hooks and more, out of the box; PostgreSQL: A powerful, open source object-relational database system. 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.

Mongoose can be classified as a tool in the "Object Document Mapper (ODM)" category, while PostgreSQL is grouped under "Databases".

"Well documented" is the primary reason why developers consider Mongoose over the competitors, whereas "Relational database" was stated as the key factor in picking PostgreSQL.

Mongoose and PostgreSQL are both open source tools. It seems that Mongoose with 18.8K GitHub stars and 2.62K forks on GitHub has more adoption than PostgreSQL with 5.38K GitHub stars and 1.79K GitHub forks.

According to the StackShare community, PostgreSQL has a broader approval, being mentioned in 2701 company stacks & 2097 developers stacks; compared to Mongoose, which is listed in 85 company stacks and 88 developer stacks.

What is Mongoose?

Let's face it, writing MongoDB validation, casting and business logic boilerplate is a drag. That's why we wrote Mongoose. Mongoose provides a straight-forward, schema-based solution to modeling your application data and includes built-in type casting, validation, query building, business logic hooks and more, out of the box.

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.
Get Advice Icon

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

Why do developers choose Mongoose?
Why do developers choose PostgreSQL?

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

Jobs that mention Mongoose and PostgreSQL as a desired skillset
What companies use Mongoose?
What companies use PostgreSQL?

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

What tools integrate with Mongoose?
What tools integrate with PostgreSQL?

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

What are some alternatives to Mongoose and PostgreSQL?
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.
Anaconda
A free and open-source distribution of the Python and R programming languages for scientific computing, that aims to simplify package management and deployment. Package versions are managed by the package management system conda.
Python
Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
Mongoid
The philosophy of Mongoid is to provide a familiar API to Ruby developers who have been using Active Record or Data Mapper, while leveraging the power of MongoDB's schemaless and performant document-based design, dynamic queries, and atomic modifier operations.
See all alternatives
Decisions about Mongoose and PostgreSQL
No stack decisions found
Interest over time
Reviews of Mongoose and PostgreSQL
Review ofMongooseMongoose

I inherited a stack where Mongoose is used in the database layer.

It's been several months and it's still the single highest source of daily WT*s in my backend development. The API is full of irregularities and the design is a poor mix of object-orientation and stateful objects with a lot implicit behavior. Mongoose made the choices of taking the worst parts of ORMs and using them in a context where the benefits of ORMs don't apply. The only reason I'm keeping it is its handy .populate() feature. Expect bad surprises!

How developers use Mongoose and PostgreSQL
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 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 AyeDeals
AyeDeals uses MongooseMongoose

We use mongoose and node-native for database querying.

Avatar of anthillsolutions
anthillsolutions uses MongooseMongoose

No-brainer for accessing Objects with NodeJS.

How much does Mongoose cost?
How much does PostgreSQL cost?
Pricing unavailable
Pricing unavailable