Technology At Large
SQL vs. NOSQL

Let me just start off by saying that this is not a benchmark or a technological comparison between different implementations. Rather, this is a discussion about a discussion.

I’ve been reading a lot of blogs and seeing many presentations about the subject of NOSQL and its effect on the SQL world. Most of the information available out there is interesting and educational, however, more and more I’m seeing extremists (yes, even technologies have those) ranting about the use of one or the other, claiming that one is “dead” or “dying” or just flat out saying that using a technology is “bad”.

This troubles me to some extent, a technology in itself can’t be “bad”, sure it can be misused but it can’t be wrong. That’s why I thought I’d share my own view on the discussion:

SQL is dead

The first and most provocative article came from Eric Lai and declared that the days of the SQLs databases are numbered. It seemed that the article hit a chord with many people, first it announced the creation of the NoSql movement which I think was a blessed initiative.

I know that one of the bigger issues I have with the way many places teach CS is that you are taught to have a “judgmental view” and not to accept technology at face value. However, when you go to learn a class such as database theory they are predominantly about SQL and not the different data models.

Secondly, the author goes on to claim that SQL is past its prime and will eventually be replaced by the NOSQL alternatives. In other words NRDBMS will replace the RDBMS.

Other bloggers riding the wave of popularity quickly joined in the fight claiming, as one person said it, that “SQL will be to our children as COBOL is to us”.

The problem with “popular” views is that more often than not they are disconnected from reality, which is clearly the case here. For one, RDBMS and the SQL language are still the standard for most of today’s applications. Not only that, but the relational model itself provides a very well defined behavior which is what most companies look for in a database.

I’m not saying SQL will be here forever, it may eventually be replaced by a different data model, but whatever that data model will be it would have to rely heavily on some well defined query language which takes its roots from algebra.

NOSQL is just a fad

The other side of the spectrum comes from people who believe that everything which is currently done by NOSQL can be done by an RDBMS, and that eventually advancements in RDBMS software will render NOSQL obsolete. I feel the resistance from the “SQL camp” is far greater than that of the “NOSQL camp” but I guess that is to be expected.

People are always weary of any change especially ones that shake the very foundation of their beliefs. As I said in my side note above, if you are taught database=SQL it is very hard for someone to tell you database=whatever works for you.

Some people attack the claims of NOSQL providers while others choose to attack the basic foundations on which many of them stand, some even try to make fun of them. None are especially informative or meaningful.

 On top of that there are many people who are genuinely concerned about their position in this crazy NOSQL world, such as DBAs and RDBMS specialists.

I know that I’m only speaking my view, but I feel these fears are unjustified. DBAs will always be needed, even more so in companies that use NOSQL alternatives where the challenges of optimization and efficiency are much more complex and usually much more strict.

Saying that NOSQL is a fad is just like burying your head in the sand. Non-Relation alternatives have existed for quite some time and the recent data models such as BigTable, Dynamo and graph-based (I know it isn’t new but the “useful” implementation is) have come here for a reason.

There are many limitations to a relational model, even if theoretically every data model can be represented by the relational model it still doesn’t infer that every data model should be represented by one.

NoSql data models are fulfilling the need that many companies, which were forced to either use an RDBMS or write their own database, have. Companies such as Google, Amazon and Facebook have been using NoSql solutions for years, whereas more and more companies are moving their infrastructure to these data models with every passing day.

Summary

Everybody likes to root for the underdog and I guess that the NOSQL movement was clever to go against SQL when it started, attacking the “big dog” is a good way to attract attention to yourself. That said, I think that NOSQL has gained enough steam to persist on its own right and the time for endless bickering over which is better SQL or NOSQL is over.

There is no “better” or “correct” solution for all problems, whenever an engineering solution is needed it’s up to the engineers to figure out what works for them given all the limitations they have. It will still most likely be SQL as long as people know that it can also be something else…

blog comments powered by Disqus