3 ms·
> NoSQL databases are another common scalable-by-default solution that companies adopt as they grow. However, we have a very complex relational data model built
by ijustlovemath 3y ago
> NoSQL databases are another common scalable-by-default solution that companies adopt as they grow. However, we have a very complex relational data model built on top of our current Postgres architecture and NoSQL APIs don’t offer this kind of versatility.
As I understand it, NoSQL is for people who need a backend that ingests just about any unstructured data, for teams that may not have a complex relational model worked out/stabilized. Postgres has this in its native jsonb datatype, but they wouldn't need to use that much since it sounds like they already have a good data model. What am I missing here?
- opportune 3y agoWhat is your exact question? To me it makes sense that you’d not want to use NoSQL if you’re dealing with data that’s already relational, and heavily leveraging features common in relational DBs that may not come out of the box with NoSQL DBs. They’re saying basically that NoSQL DBs solve a lot of horizontal scaling problems but aren’t a good fit for their highly relational data, is my understanding. Not that they can’t get NoSQL functionality at eg the query level in relational DBs.
- ffsm8 3y agoI think they're equating relation database with databases with ACID guarantees, as thats basically a full overlap on a venn diagram. And we all know that acid has to go at some scale, even if that scale keeps getting pushed further out as our hardware gets better. (Same with the relational guarantees that eat performance... But only once you've reached a certain amount of throughput and data)
- suhastech 3y agoUsing NoSQL might not be the best idea in this case. I've seen it backfire for many companies. They start with NoSQL, but then end up needing relational features as their business grows. This leads to performance issues, redundancy, and data sync problems early on, which shouldn't be happening. Especially in the early days, NoSQL companies used to market their databases as general-purpose database that scale easily, but that hasn't always been the case obviously. I usually recommend starting with a relational database like PostgreSQL. If scaling becomes necessary later on, you can invest in sharding the database. Figma's approach seems reasonable given the tools available at the time. I've helped small companies switch from NoSQL to SQL because the benefits of NoSQL weren't worth the trade-offs at their stage of growth. In case, anyone is in a similar boat: https://mongotosqlmigration.com/ https://mongotosqlmigration.com/
- vmfunction 3y agoif you have postgres, just use https://github.com/FerretDB/FerretDB https://github.com/FerretDB/FerretDB
- jimbokun 3y agoIf scaling isn’t an issue, use a relational database. “NoSQL” only really pays off when you need to scale horizontally. And even then, one of the horizontally scaling SQL solutions might be a better bet.