NoSQL Databases arose from a realization that sometimes you don't need all the features of a relational database, for example:
- Redis which at the most basic level is a key value cache
- MongoDB which stores (denormalized) documents
NoSQL Databases like MongoDB are best when:
- All data related to a certain entity can be reasonably self contained (i.e. does not require relating to other possibly dynamic pieces of data)
- referential integrity (knowing that User.storeId can be treated as just a string) does not need to be maintained
- Constraint checking does not need to be performed or can be performed at the application level
- Schemas are either wildly variable or do not change at all, or checking them just isn't important.
The best example I hear often is a news site or blog -- if your main model is something like an Article that contains the author, content, tags and all data necessary to display one entry (and 99% of the time you get one Article and are not required to request related data that exist in separate collections), then NoSQL makes sense.
It's a tired conversation I think people have had repeatedly for a long time, so I won't go into it again (I'm also VERY biased towards RDBMS and in particular Postgres) -- would love to hear from experienced MongoDB proponents though!
One case I know Mongo was trusted for very early on was large scale out use cases, and after WiredTiger their execution engine improved immensely as well. I assume it's still great for that, where scale out is often quite lacking in RDBMS or not in the core experience.
[0]: https://en.wikipedia.org/wiki/Relational_database#Relational...