UnQL is SQL for NoSQL - new language, new Couchbase
Written by Kay Ewbank   
Tuesday, 02 August 2011

NoSQL database fans now have more to get excited about with the release of Couchbase Server 2.0 along with a NoSQL query language called UnQL.

Couchbase has been developed by the company formed by the merger of Membase and CouchOne.

couchdbIcon

According to the announcement the new server

“combines the unmatched elastic data management capabilities of Membase Server with the distributed indexing, querying and mobile synchronization capabilities of Apache CouchDB”.

In practice, CouchDB handles the data storage, indexing and distributed queries, while the Membase components provide cluster management technology so that the server can scale out from one to hundreds of nodes. Membase is also responsible for the management, monitoring, and alerting elements. Memcached, which is built into Couchbase Server, takes care of in-memory caching.

While the availability of CouchBase 2 is good news, the announcement of UnSQL is attracting more attention. The aim is to make UnSQL the standard query language for unstructured databases, SQL for NoSQL,

UnSQL has been created by Damien Katz (the brains behind CouchDB), and Richard Hipp (the creator of SQLite). UnQL is available at www.unqlspec.org, and further development of the language is open to participation from users, vendors and the academic community.

According to Couchbase, UnQL is SQL-like in syntax with additional capabilities to allow for selection and manipulation of complex document structures. SQL itself isn’t suitable for use with NoSQL databases because of their lack of database schemas, which means you can be expected to create queries without knowing what document types you’re working with in the database. UnQL overcomes this by allowing queries to be created that look at the data in the documents rather than expecting the query to know what type of data is present.

You can view the current information about UnQL here: http://www.unqlspec.org/display/UnQL/Home, though sadly the query examples section is still a work in progress.

The language is based around an Explain statement that itself is made up of many familiar sounding keywords - Select, Insert, Update, Begin, Commit, Rollback, but what’s different is that these apply to unstructured data collections.

 

unqlsyntax1

 

In addition, you get Pragma, and Create and Drop Collection rather than Create and Drop Table. Select then has all the familiar clauses - From, Where, Group, Having, but again, these refer to collections rather than tables. Pragma is based on the SQLite extension (http://www.sqlite.org/pragma.html) rather than the Oracle/PLSQL Pragma directive.

Without some examples, it’s difficult to say for sure just how revolutionary UnQL will be. The developers say they’ll put up examples and some more details ‘soon’.

 

couchdbIcon

If you would like to be informed about new articles on I Programmer you can either follow us on Twitter or Facebook or you can subscribe to our weekly newsletter.

Banner


A Trio Of Coding Agents At Microsoft Build
20/05/2025

Day 1 of Microsoft Build 2025 was, as expected, an AI-focused event with Satya Nadella devoting much of the keynote to artificial intelligence agents giving us a picture of a future in  whic [ ... ]



Z3 Completed This Day In 1941
12/05/2025

On May 12, 1941 Konrad Zuse completed his Z3 computer, the first program-controlled electromechanical digital computer. It followed in the footsteps of the Z1 - the world’s first binary digital [ ... ]


More News

Last Updated ( Tuesday, 02 August 2011 )