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.


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.




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’.



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.


AI At All Levels From Udacity

AI may be threatening to take away our jobs - but on the other hand it opens up plenty of opportunities for those with the right skills. A whole raft of Udacity Artificial Intelligence Nanodegree prog [ ... ]

Get Onboard Kotlin With Jetbrains

There's a free course designed for novices in Kotlin that focuses on the basic concepts of the language. Apart from the content itself, the interesting of feature of this course is that it runs i [ ... ]

More News

Last Updated ( Tuesday, 02 August 2011 )