SQL – not dead yet!

Just when you thought it was safe to dump all your MySQL tools, switch SQLAdministrator for RoboMongo and dump ApachePHP for Node.js, it appears someone has thrown a thumping great spanner into the works.

Why would SQL be dead anyway? The simple answer is scalability. SQL servers were initially designed as feature-rich monolithic monsters with very little focus on performance, dating back to the days if Ingres in the 1980’s I recall while at University submitting a simple SELECT request that should’ve returned 20 items and waiting a number of minutes for a response. Now whereas this is an exaggerated example, the basic principle remains and indeed carried on for many years after Ingres morphed into Postgres.

It was only with the advent of MySQL that SQL databases suddenly became perceived as something you could use in real time for performance sensitive jobs, indeed this was the Raison d’être for MySQL, with a focus on speed and stability and to hell with the featureset. Indeed MySQL and Postgres have spend the last 20 years converging, with Postgres gaining stability and speed, and MySQL gaining features. Neither however have really managed to obtain real scalability. True, replication is a feature, and indeed MySQL in particular makes all sorts of claims with regards to it’s clustering ability, maybe making little mention of the memory requirements, but true scalability – no.

So why “NoSQL”?

In principle, many databases could be classified as “NoSQL”, indeed technically anything that isn’t an SQL database (?!). Typically however NoSQL refers to key/value databases with some high-level API’s stuck on the front-end, and hopefully some sort of scalability thrown into the mix. Sound a little simplistic, well it is! NoSQL is a step back down the evolutionary tree. Gone are many of the features we’ve come to expect from MySQL, gone are many of the automatic optimisations that protect programmers from doing stupid things, in their place we have more performance and more scalability and a completely new set of spanners!

When I say a step back down the evolutionary tree, what I mean to say is that any ex-PICK programmers out there from the 80’s/90’s used to working on Fujitsu, Altos, AP, Universe, Unidata, NoSQL is right up your street! You now have a transferable skillset!

Essentially we’re back to key/value (hash) databases with additional hashes as indexes (if you want them), and records stored as ‘blobs’ that you read in their entirety and break up as / when you want them in a free-form manner with no schema in sight. (I’m referring to MongoDB in particular here to be on the safe-side [as one of the major NoSQL contenders] as of course NoSQL ‘can’ refer to just about anything)

Anyway, why is the war not over just yet? Well, try “installed user base”, then take a look at the following which is an excerpt from the new WebScaleSQL website.

…. From the WebScaleSQL website ….

What is WebScaleSQL?

WebScaleSQL is a collaboration among engineers from several companies that face similar challenges in running MySQL at scale, and seek greater performance from a database technology tailored for their needs.

Our goal in launching WebScaleSQL is to enable the scale-oriented members of the MySQL community to work more closely together in order to prioritize the aspects that are most important to us. We aim to create a more integrated system of knowledge-sharing to help companies leverage the great features already found in MySQL 5.6, while building and adding more features that are specific to deployments in large scale environments. In the last few months, engineers from all four companies have contributed code and provided feedback to each other to develop a new, more unified, and more collaborative branch of MySQL.

But as effective as this collaboration has been so far, we know we’re not the only ones who are trying to solve these particular challenges. So we will keep WebScaleSQL open as we go, to encourage others who have the scale and resources to customize MySQL to join in our efforts. And of course we will welcome input from anyone who wants to contribute, regardless of what they are currently working on.

Who is behind WebScaleSQL?

WebScaleSQL currently includes contributions from MySQL engineering teams at Facebook, Google, LinkedIn, and Twitter. Together, we are working to share a common base of code changes to the upstream MySQL branch that we can all use and that will be made available via open source. This collaboration will expand on existing work by the MySQL community, and we will continue to track the upstream branch that is the latest, production-ready release (currently MySQL 5.6).

…. And back to Earth ….

It is worth a thought before throwing out the bathwater, NoSQL systems also have their challenges and in much the same way as MySQL clustering isn’t what most people expect from the label on the tin, some of the claims from the NoSQL camp could also bear some scrutiny.