Tech IndustrySep 18, 2019
Altisourcenewsearc

SQL vs NoSQL

This question comes all the time. What makes you go for a nosql db and which one to choose ? There are so many - mongo, cassandra etc. How much of this is architecture driven ? Or you tend to use what the organisation has been using ? Kindly provide insights.

Add a comment
Amazon hdragon Sep 18, 2019

NoSql if I know what to query during dev time, SQL if I don’t, e.g, olap report. Also, nosql has incentive to go for managed service like DDb.

Valero Energy Corporation UrdntGrunt Sep 18, 2019

CAP theorem maybe.

Altisource newsearc OP Sep 18, 2019

Has ACID anything to do while selecting SQL db. Mostly Atomicity.

MemSQL hghv123 Sep 18, 2019

Cost of error. E.g. how much does it cost you to fix data error. Total cost, including damaged reputation etc.

Google m6r4 Sep 18, 2019

I lean towards "NewSQL". I think it's more common to need a transaction or a join than it is to need the scaling advantages provided by the NoSQL DBs. The most important thing is to put DB access behind other interfaces.. Most of the SQL horror stories are giant monoliths with no architecture.

Altisource newsearc OP Sep 18, 2019

Thats a nice answer but I feel it should not be that simple. I believe there should be something more in NoSQL so people are moving towards it.

Google m6r4 Sep 19, 2019

People were moving to it a few years ago when the state of SQL databases was really bad from a scaling and flexibility perspective. Now you have cloud native DBs like Spanner and Amazon RDS that solve a lot of these issues while still providing the features that made SQL the dominate standard for so long.

New
CeEb70 Jan 25, 2022

There's no right or wrong answer as companies like Uber and Netflix have proven to achieve scale with either technology. This means that for most cases, you will probably do well with either choice. What will be is important is understanding and acknowledging that both works, but what are the pros and cons of each DB and thus, which are more suitable. You can find out more at https://nodeflair.com/blog/sql-vs-nosql-databases-system-design-interview