Ad hoc queries
Social applications can go from 0 users to a million users in a very short time. The best DB fit for these kinds of applications is the DB that can easily scale horizontally which is where MongoDB comes into the picture.
Ads can be saved and updated from all kinds of sources. Data is not really related to each other but there is a lot of them.
Archiving a lot of data that may or may not be retrieved often can be done with a NoSQL DB like MongoDB.
MongoDB tends to be faster than relational DB when it comes to retrieving data. NoSQL database scales horizontally and is designed to scale to hundreds of millions and even billions of users doing updates as well as reads
Relational DB tends to be faster on ad hoc queries, updates, and joins. But applications can be designed and developed in a way to avoid these use cases. For example: to update you can use primary keys to update.
NoSQL scales horizontally (add more servers) but SQL Relational DB scales vertically (add more memories).
SQL relational DB must know columns and data types of the data to store. NoSQL DB does not have to know columns and data types. A row in a SQL relational DB contains all columns even if they are empty. A row in a NoSQL DB may or may not have all columns.
Schema changes are problematic and time-consuming in the world of SQL. NoSQL is great when business requirements are not stable and keep changing. You don’t have to modify or alter table and column definitions which is a painful process.
DisadvantagesJuly 30, 2019