Couchbase 4.1 delivers greatly-enhanced SQL capabilities

Couchbase's "N1QL" dialect of SQL, first introduced with version 4.0, now features full CRUD support, covering indexes and prepared statements. Just like a mission-critical database ought to do.

When I covered the release of Couchbase Server 4.0 back in June, I was excited to discuss the addition of N1QL (pronounced "nickel"), Couchbase's dialect of SQL. Finally, I thought, the NoSQL world was coming to its senses. The addition of N1QL (and similar additions by other NoSQL products) provides outreach to seasoned relational database management system (RDBMS) professionals, by supporting a robustly-implemented SQL dialect for querying data.

Get with the (SQL) program
Now, with a mere point release update in the form of Couchbase Server 4.1, the company behind the eponymous product has upped the ante. Rather than merely supporting SQL for querying purposes, the ability of the language to create, update and delete data is now supported by Couchbase as well: specifically, N1QL now supports SQL's UPDATE, INSERT, DELETE, UPSERT and MERGE commands.

Couchbase even uses the relational database term of art to describe the full support, stating in its press release that "the new release adds full CRUD support." CRUD, which stands for "create, read, update and delete" is a term commonly used in database administrator (DBA) and application development circles to describe very common line-of-business application functionality around data. RDBMSes have supported this for decades. NoSQL databases are now seeing the wisdom is supporting SQL for full CRUD operations as well.

Prepare and cover
Beyond SQL support per se, Couchbase now supports the mainstream RDBMS concepts of covering indexes and prepared statements. Covering indexes allow a DBA or dev to create an index on a combination of columns in a database table that match the sort order and/or filtering criteria used in frequently-occurring queries, often underlying reports. Such indexes allow the queries to run much more quickly.

Prepared statement support allows the database to develop and save an execution plan for a query. This avoids the need to concoct such a plan from scratch every time a given query is run. For queries that are run frequently, this can mean a big performance boost. Combined with support for covering indexes, the prepared statement capability makes Couchbase much faster for frequently-run queries. In fact, Couchbase says customers can expect "2-3x Faster Query Performance."

Back to the ranch
Again, the features discussed here are in no way new to the database world. But they are new in the NoSQL world. And because Couchbase has these features, especially covering indexes and prepared statements, it tempts me to stop thinking of the product as a NoSQL database and instead, just think of it as a database.

If Couchbase subsequently adds support for tables/buckets that have pre-declared schemas and enforces compliance of those schemas on their tables, then the distinction between it and RDBMSes would go away. Similarly, if one of the major RDBMS products added support for document store-typed tables or even column families in standard tables, then RDBMS/NoSQL siloes would effectively go away.

Meanwhile, databases with a NoSQL pedigree offer far simpler horizontal scaling than their RDBMS counterparts and are often open source. Those that add support for the full relational paradigm will bring that scaling ease to RDBMS professionals, without forcing them to make false choices to get that scalability. That then will put pressure on the RDBMS incumbents to improve their own scale out stories. And that's how the industry will move forward.