| ▲ | leafarlua 6 hours ago | |||||||
Makes sense. But in this case, why NoSQL exists? What problems does it resolves and when should it be considered? I'm being naive, but fast changing environment has been one of the main advantages that I was taught from devs when it comes to NoSQL vs SQL (nosql being the choice for flexible schemas). So it is more about BASE vs ACID? | ||||||||
| ▲ | yfontana 2 hours ago | parent | next [-] | |||||||
As a data architect I dislike the term NoSQL and often recommend that my coworkers not use it in technical discussions, as it is too vague. Document, key-value and graph DBs are usually considered NoSQL, but they have fairly different use cases (and I'd argue that search DBs like Elastic / OpenSearch are in their own category as well). To me write scaling is the main current advantage of KV and document DBs. They can generally do schema evolution fairly easily, but nowadays so can many SQL DBs, with semi-structured column types. Also, you need to keep in mind that KV and document DBs are (mostly) non-relational. The more relational your data, the less likely you are to actually benefit from using those DBs over a relational, SQL DB. | ||||||||
| ▲ | marcosdumay 6 hours ago | parent | prev | next [-] | |||||||
NoSQL was created to deal with scales where ACID becomes a bottleneck. It also shown itself useful for dealing with data that don't actually have an schema. If you have either of those problems, you will know it very clearly. Also, ironically, Postgres became one of the most scalable NoSQL bases out there, and one of the most flexible to use unstructured data too. | ||||||||
| ||||||||
| ▲ | gf000 5 hours ago | parent | prev [-] | |||||||
Probably the best use case would be something like a Facebook profile page for a given user. It may not have a very rigid schema, you may later add several other optional fields. You need very large scale (as in no of concurrent accesses), you want to shard the data by e.g. location. But also, the data is not "critical", your highschool not being visible temporarily for certain users is not an issue. You mostly use the whole dataset "at the same time", you don't do a lot of WHERE, JOIN on some nested value. In every other case I would rather reach for postgres with a JSONB column. | ||||||||