3 ms·
There are two main reasons to choose NoSQL. The first, aimed at every developer/application out there, is that some NoSQL solutions (document stores being the
by latch 15y ago
There are two main reasons to choose NoSQL.
The first, aimed at every developer/application out there, is that some NoSQL solutions (document stores being the most obvious to me) have less friction with OO languages. In other words, they are simply more productive to work with. Embedded types, arrays as first class objects, and schemaless design all help you write simpler infrastructure code that takes less time to write, test and maintain.
The second reason is that some NoSQL solutions provide specialized features/capabilities. For example, what you can do with an [Ordered] Set in Redis simple isn't possible with relational databases of moderate (say 100K rows) size. You either have to lower your requirements (not real time), or increase your hardware. There are various examples...Solr does better indexing, Hadoop does better data processing....MongoDB does good logging and geospatial stuff.
The right way to look at it, imo, is to see RDBMS as specialized systems. Most people should almost always opt for a more productive general purpose solution upfront (say MongoDB), and then only turn on a specialized supplementary system (say Hadoop, or PostgreSQL) when they have those specialized needs.
Choose SQL for the right reasons.
- St-Clock 15y agoThe first part of your post made sense until you said "The right way to look at it, imo, is to see RDBMS as specialized systems". RDBMS have a lot more features and support many more usage scenarios out of the box than any NoSQL systems and SQL offers more features as a query language than any other NoSQL query languages. Of course, NoSQL query languages are simpler than SQL by design because the programmer is expected to write a program or a script for complex queries instead of using the query language. But then, you have to write your own execution plan, and think about atomicity and consistency, etc. NoSQL are clearly the specialized systems, not the general ones.
- dikbrouwer 15y ago"MongoDB does geospatial stuff" - FYI, PostgreSQL with Postgis has many more geospatial querying capabilities vs Mongo which primarily uses geohashes.
- geebee 15y agoI think I'd agree with a milder version of your post (I definitely don't see why you're getting negged here). I didn't like the phrase "noSql" when I first heard it (still don't, really), but once I realized the movement was really more about "notAlwaysSql", it started to make sense. People had been using an RDBMS almost reflexively for most kinds of persistence, and they don't always make sense. That said... some NoSQL may work better with OO, but so do some RDBMS schemas. I've had experiences where it's simple and almost 1:1 between object and table, and other times when I'm bending so far that I wonder why we're taking an OO approach at all. I don't think that I'd disagree with your claim that an RDBMS is a specialized system, but I'm not sure that various noSQL solutions are any less specialized. I agree, choose SQL for the right reasons, but you could just replace that with "choose your persistence approach for the right reasons".