No SQL, please!

So tomorrow I am going to the NoSQL meeting in Barcelona and I decided to start a “digging” a bit more, on what is this new trend of databases that is on “everybody’s lips”…

NoSQL is advertised as being AGILE and scalable, which are two things that everybody is looking for these days. Relational Databases are undoubtedly an established field, with a strong theoretical (mathematical) basis behind. However, “AGILE” and “scalable” are two boxes they do not tick. To design a good relational database you need a typical top-down approach, where you know everything about your data. Unfortunately, this almost never the case, and many people probably experienced “painful” redesigns of relational databases!

Scaling, also typically means getting “bigger servers with more memory”, which in the age of distributed computing, is becoming less and less the scenario we want to pursuit.

And this is when NoSQL databases bring an interesting approach. They are mostly “about data”, but you do not need an detailed model about your data. Sometimes NoSQL databases are advertised as having “no schema”, which is not entirely true, but they certainly have a more “flexible” schema. Also, they are so much simpler, that they are easily scalable, and they have much faster response than complex relational databases with lots of joins between tables. This seems like the perfect thing for the web, where you have lots of data, and need short response times; maybe that is why apps such as Facebook or Twitter are hosting their data on NoSQL solutions.

Another “old” problem is the division of the software community between database Managers and programmers; these were usually two very different (and some times incompatible!) types of people.  Mostly DBA need to know about complex installation procedures, backups, permissions, etc; programmers do not care about all that, and they do not really want to waste time with it! They will be happy to know that in NoSQL databases these procedures were made much easier. Another reason to call NoSQL “programmers friendly”, is that there is a huge “clash” between the relational model (based on tables and rows) and the object oriented model. One of the examples is the inability of databases in representing “trees”. There are obviously, workarounds around this, but every object oriented programmer that ever touched a database proprietary language had become aware of how different the two approaches are. It is possible to connect them, but it is not necessarily an easy, or pleasant task. With NoSQL databases, we are speaking of a totally different thing.

After all this, you are probably thinking to switch to NoSQL databases. But not so fast. If you need absolute reliability, they are probably not a good idea, as they implement a concept called eventual consistency; this is basically saying that “well… eventually, after enough time without new information, the changes will propagate to the whole database”; “what about before that time?”; “hu… well, then you may get wrong or incomplete answers to your queries”. Is this something you can accept? Well, if you have a database with comments of people, maybe is not a big deal if you do not display one or two comments; but for instance, if you need to know how many airplanes are in a airport track in order to allow new ones, than maybe the accuracy of the response is going to be critical…

Another thing that people common refer is that this new technologies are still immature, when compared to the strongly established relational databases, and that there is still a lack of expertise on the area…

In any case, put my “thumbs up” to databases who are going to make data management more AGILE and who are going to support huge amounts of data in a more efficient way! And look forward for the conference tomorrow 🙂

Advertisements

One thought on “No SQL, please!

  1. Pingback: Database Merging | heartcode

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s