In applications, you can store data using a relational database.
The relational database already gives you the power to create complex relationships between data. Instead, you use a non-relational database.
Why? Why do you need MongoDB?
And if your argument is that MongoDB is a simple-to-use NoSQL database, so I prefer MongoDB, then actually, you don't understand the actual use case of MongoDB.
So, the use case starts when you build a social media application, a quick-commerce application, or an application where the attributes of a field are not fixed.
In this type of application, each product has different attributes, and for that, in a relational database, you need to create many optional fields so the table supports different types of product data.
This approach works, but after a certain level, it requires a heavily normalized design that supports all the products at a higher scale.…