Before the relational model, databases worked like large linked lists; whether hierarchical or peer-to-peer, data retrieval was a matter of link-walking until the right record showed-up.

SQL and the relational model changed that. With their advent it was possible to describe the data required and then have the DBMS do the work of finding it. Importantly, both the data model and the declarative nature of SQL meant that querying was open ended rather than something that had to be set in stone at design time.

With the NoSQL movement, database system creators made deliberate design decisions that generally favoured scale, uptime and redundancy at the expense of querability. For a while it looked as though there was a stark choice between querability and scalability.

Today's release of Couchbase 4.0, with N1QL, means we get to have both. Not only do we continue to get the scale and speed of a clustered document databse with in-built caching, but for the first time we get a generally applicable declarative query language for those JSON documents.

It's true, there are other JSON query languages but they've either been limited to one particular database system or they've not been implemented in a production-ready database.

The beauty of N1QL is that we all know it already: it's just SQL with some additions to handle semi-structured, nested data. It is also backed by academic research and already in production use. So, there's very little new to learn and you retain the full ad-hoc querability of SQL, including JOINs!

Download Couchbase Server 4.0 and try it for yourself.