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


The Feds Want Us To Move On From C/C++
13/11/2024

The clamour for safe programming languages seems to be growing and becoming official. We have known for a while that C and C++ are dangerous languages so why has it become such an issue now and is it  [ ... ]



Apollo Adds REST APIs For GraphQL
29/10/2024

Apollo has added a simpler way to integrate REST APIs into a federated GraphQL environment. Available now in public preview, can be used to map REST API endpoints to their GraphQL schema using a decla [ ... ]


More News

Last Updated ( Tuesday, 02 August 2011 )