The NoSQL Debate: Automatic vs. Manual Transmission
25hoursaday.com
25hoursaday.com
Most of the solutions people are talking about when they mention NoSQL are not replacements for SQL databases. They are completely different beasts. I suppose if we're going to use strained metaphors I'd say SQL vs. NoSQL is akin to diesel vs. a V12. That is they are both fine technologies and, except for the very loosest of definitions, they do completely different things.
If you think NoSQL and SQL are actually battling, you need to do more reading...
However, many people, even ones that should know better, do not see it that way. A lot of Relational DBAs, especially the ones that just see it as a way to make a living and have no real passion for it, see NoSQL as a threat to their jobs and want it to die. On the flip side, many NoSQL advocates really are championing it as replacements for a relational database for almost all use cases.
There should not be a debate, but there really is one going on.
Personally, I'm drawn to Mongo, etc. because I can develop in my language of choice, and not have to write/debug SQL of any dialect to store and retrieve my data.
An ORM with a relational database would let you do the same thing.
SQLAlchemy in Python is reasonably good for a project nearing a 1.0 release and Linq works nicely with C#. Virtually every other major language has at least one ORM available to it.
That is not to say that a relational database with an ORM is the way for you to go at all, just that avoiding writing SQL code it probably not the best reason by itself to choose your database platform.
I've learned my lesson - if I'm working over SQL, I'll use SQL. Either via the direct record oriented API of the language, or using a thin abstraction like iBATIS that wraps the inputs and outputs into convenient data-carriers.
MongoDB is different. The "document" is real to the database. When you're saying something like "add a foo to the list of foos of record X", that is pretty close to the low level action that actually gets performed on disk. There is no abstraction-translation step to get out of whack.
Eventually, some bug comes up, and you need to peek at what queries the ORM is generating, and then peek at what is actually in the database, and etc.
But at this point, you have to not only know what's going on with your particular SQL dialect, you also have to know syntax hoops for whatever particular ORM you're using. Instead of even just language + SQL, you've got language + ORM + SQL , which is even worse for focusing on whatever I was trying to build in the first place!
Whereas, with a NoSQL solution, you're (probably) dealing with JSON, which works nicely and reliably and transparently in pretty much every language ever.
For years now, people have been using SQL as the default way to store things — and to very rarely use anything else. NoSQL simply means that there are other options. Widen your horizons.
I don't see how that is inflammatory.
But then again, why would you engage in a discussion about something you know nothing about?
For many of the people on both sides of this argument, I think they are both right in that the solution their promoting is optimal in certain contexts.
For many of the people on both sides of this argument, I think they are both wrong in that their advising using a tool across the board, independent of the context of its use.
Also, "good programmers know how to index properly" and "he's a dba that's scared of his career disappearing" are both ad hominem arguments. Let's stick to facts people.
NoSQL means this: "Hold your horses, are you sure SQL is the right option for storing that? There are other options."
In any debate, extremist views will tend to get heard as much, or probably even more, than the rational ones, but the concept didn't start out irrational, it started out the way I just described it.
Then came the nutbags who claim that either SQL never ever scales, or that SQL is in fact the only way to store anything at all in the real world and that it fits every use case in the known universe, perfectly.
The O stands for Only. As in Not Only SQL. I believe the term is somewhat misleading.
Which deployments are you thinking of when you say NoSQL DBs are not competitive with relational ones?
I'm not sure you're really paying attention to the real debate here.
Most of the people using non-relational data stores (for actual work) are employing it in tandem with traditional RDBMS solutions. And those that are feeding on a strictly NoSQL diet are usually just toying around or using Fisher-Price wrappered versions of NoSQL like App Engine's Datastore or Amazon's SimpleDB.
I use non-relational solutions combined with a RDBMS solutions but that seems to put me on the other side of the debate.
Now, ~20 years later, it's the SQL advocates playing the same role as those grizzled old champions of mainframe fare hierarchical and VSAM-like structures.
I think the same may be true in many cases with NoSQL. I want to try something different, and it's going to perform better for what I'm doing anyway, so why not.
In some experiments at work we got SQL server to do a bulk import of around 1 million rows (with quite a few interspersed reads) in around 5m 30s. We got the same inserts to happen in Mongo in less than a minute. So, we went with Mongo. Do we need that speed? Maybe, maybe not. It sure has been fun to try something new, though.
The downside to the manual transmission is simply that when you don't care to exert more driving effort in a given situation that doesn't benefit enough from the increase in enjoyment, power, economy, and control, you're better off with an automatic in that situation. As before, this aspect also translates rather nicely. :)
MySQL, for all its virtues, is like the little kid brother of real RDBMS systems. Getting slightly improved performance opposed to a NoSQL system is NOT going to convince someone with a behemoth Oracle rack to switch.
I'd like to see some systems and benchmarks showing how NoSQL systems can compete in the ridiculously high-volume, high-speed space. And yes, I know Google does with BigTable, and that it's theoretically possible, but I haven't seen any implementations prove they can, yet.
As a person who is investigating NoSQL as viable for a particular task, the substantive posts on either side have been valuable to me.