>Sometimes it's faster for certain operations, and can be easier to turn distributed
this, plus, sometimes you want to store unstructured data for some reason.
In 99% of the cases, you do not want to use nosql.
I used to work at a well known tech company, we built something with a nosql db. I tried to push back, but I was a junior at the time and the project had already started when I joined. Didn't want to rub anyone the wrong way, so I just rolled with it.
A year later, the scaling pain was so huge, costs were unmanageable, and that was "pre deployment" (aka just having clients randomly ping the server and write an entry to the database). The minimum size of each entry was ridiculously large (>2kbs I believe), and we were building a service for a large large number of users.
And to make matters even more painful, it was a microservice architecture (no docker or k8), which meant that to test a change, you had to run a shit ton of microservices locally (which some required running in certain order).
One of the biggest pains was doing joins in code instead of in the database. Every "type" of data was it's own microservice. For example, creating an employee might have implied calling a user microservice, which gets the record from the calling user, then calls the business microservice (to check if the user has "admin" permissions in the business or something), then makes a get on the user db to verify the new employee doesn't exist, then finally create an employee in the user database. That whole shit could take an easy second, sometimes 1.5 seconds. Even worse-er, this was distributed, so sometimes data was not co-located, which meant that it had to make cross continent requests to nosql dbs. Absolute fucking nightmare.
And to add insult to injury, the data was very very structured.
All of this could have been done much cleaner, cheaper, quicker, and more performant with a nice SQL database, perhaps cockroach or postgres. All the microservices shit would've become moot once it's SQL and you can actually use the database. Even IF they decided to keep the terrible microservices architecture and have a db per type, a SQL database would've been many times cheaper and more performant (which in this case, meant millions).