Why mongoDB is being used in django project

Viewed 101

As we know we can build great application with django using postgresql database or additional scalability and feature, sometime we use redis

I have notice some people using mongodb in their django project. My question is, what is the case and what specific purpose they are using mongoDB in their django project.

Why can't those feature can't be achieved by postgresql or redis?

1 Answers
  • mongoDB and redis are Non-Relational (No-SQL) Databases.
  • postgresql is a Relational (SQL) Database.

Choosing the type of DB depends on people's requirements.

SQL Databases

SQL databases are known as relational databases, and have a table-based data structure, with a strict, predefined schema required.

Eg: Oracle, MySQL, Microsoft SQL Server, and PostgreSQL

No-SQL Databases

NoSQL databases, or non-relational databases, can be document based, graph databases, key-value pairs, or wide-column stores. NoSQL databases don’t require any predefined schema, allowing you to work more freely with “unstructured data.”

Examples:
Document: MongoDB and CouchDB
Key-value: Redis and DynamoDB
Wide-column: Cassandra and HBase
Graph: Neo4j and Amazon Neptune.

What is the case and what specific purpose they are using mongoDB in their django project?

There are many reasons for that.
I suggest you to read this to know why and in what cases people choose No-SQL DBs over Relational DBs - No-SQL vs Relational DBs

Related