Skip to navigation
Real World Computing

Understanding the "NoSQL movement"

Posted on 11 Feb 2010 at 14:28

Ian Wrigley takes a look at an alternative to relational databases: the so-called "NoSQL Movement"

Instead, they employ key-value stores, or what are often called “document-orientated databases”. The idea is that you supply a key or unique piece of information that the storage engine can use to look up the data associated with that key, but the data doesn’t have to be a single piece of information: it might be a whole collection of data stored in some common format.

One of the leaders in the field at the moment is CouchDB, which is being developed under the wing of the Apache Software Foundation, the same outfit that looks after the Apache web server. CouchDB stores data in JSON, or JavaScript Object Notation, format. CouchDB is written in Erlang, a computer language that the cool kids are very excited about right now (as they were about Ruby last year, Python two or three years ago, and so on).

CouchDB is written in Erlang, a computer language that the cool kids are very excited about right now (as they were about Ruby last year, Python two or three years ago, and so on)

To be fair, Erlang does some things, and more specifically the kinds of things needed by a system such as CouchDB, very well indeed, and it certainly appears suited for this particular application. Regrettably, though, I’m no longer one of the cool kids, because I don’t have the time or inclination to learn yet another language right now, although fortunately you don’t need to know much Erlang in order to use CouchDB, thanks to its decent documentation.

Installation is simple, via an apt-get or two on a Debian-based system, an RPM install on a Red Hat-based system and so forth, and there’s even a Windows binary available. Once you’ve installed the system, you can start storing data by making simple HTTP calls to the server. It has a RESTful interface (which is another thing the cool kids love), so storing data is a simple matter of making a PUT call, while retrieving it again just uses a standard HTTP GET request.

The documentation has plenty of examples in a multitude of different programming languages, so unless you’re using something particularly obscure, you should be up to speed in no time.

Central to CouchDB is the concept of Views, which are essentially ways of indexing your data so you can look up entries based on any of these index values, not just by a single key. That’s rather different from some other offerings in this particular application space, and it will make people used to traditional RDBMSes just a touch happier (even though the documentation is at pains to point out that CouchDB is in no way an RDBMS).

Other distributed key-value stores

CouchDB isn’t by any means the only distributed key-value storage solution out there.

Others include MongoDB, Amazon’s (closed-source) SimpleDB, which runs on Amazon’s own Cloud computing platform, and Cassandra, which started life as a project at Facebook and has now been open-sourced. (Facebook is currently open-sourcing quite a lot of code, which is terrific – hats off to Facebook management for giving back to the developer community.)

A point to note, though, is that many of these projects are relatively young and therefore still under development, which means that there may be bugs still lurking, and you’ll need to be careful before you deploy them in a production environment.

However, if you find that you’re running into scalability problems, or if you’re simply interested in how the big guys do things and want to increase your knowledge in that area, it’s worth experimenting with one or more of these.

1 2 3
Subscribe to PC Pro magazine. We'll give you 3 issues for £1 plus a free gift - click here

From around the web

User comments

excellent

Excellent article considering I am currently studying SQL at university. Thanks :D

By 00lissauers on 11 Feb 2010

So good I registered to leave a comment

Thanks Ian for a really clear and easy to understand explanation of the problems and how we might tackle them.

By Crystallise on 18 Feb 2010

Superb !

Can't really add anything original to the comment from Crystallise. Nicely written, Ian, and a great lead into the new 'object database approaches'. New territory for me as an old SQL hand. Will be digging deeper ! Thanks again.

By triballus on 19 Feb 2010

Ironic - There's nothing new under the sun.

I spent eight years working in the UK and Sweden with a proprietary Swedish product (try Goggling: tieto trip) that exactly fits the "noSQL" description described here and its been around since the 70s!

At the time I called it 'one of Sweden's best kept secrets' and it is now, despite the media bias in the blurb, used by companies and some Scandinavian governments as an archiving system for large amounts of unstructured data.

By lokash20 on 1 Mar 2010

Forgot to add...

I just wish it were open sourced.

By lokash20 on 1 Mar 2010

There's nothing new under the sun (again!)

Lotus Domino was doing this kind of stuff 20 years ago, and is still doing it today.

The guy who created CouchDB, in fact, was on the Domino team before he left to do CouchDB. He once described CouchDB as "Domino, built for the Web from the ground up" or something like that.

He was able to leave behind some of Domino's limitations (not to mention the much-unloved Lotus Notes client software).

By BrownieBoy6 on 11 Jul 2011

Leave a comment

You need to Login or Register to comment.

(optional)

Ian Wrigley

Ian Wrigley

Ian Wrigley runs W A Communications, a Los Angeles-based technology consultancy. He's an advocate of open-source technologies, particularly on the server side, and is on the board of directors of the British Academy of Film and Televsion Arts/Los Angeles.

Read more More by Ian Wrigley

advertisement

Latest Real World Computing
Latest Blog Posts Subscribe to our RSS Feeds
Latest News Stories Subscribe to our RSS Feeds
Latest ReviewsSubscribe to our RSS Feeds

advertisement

Sponsored Links
 
SEARCH
SIGN UP

Your email:

Your password:

remember me

advertisement


Hitwise Top 10 Website 2010
 
 

PCPro-Computing in the Real World Printed from www.pcpro.co.uk

Register to receive our regular email newsletter at http://www.pcpro.co.uk/registration.

The newsletter contains links to our latest PC news, product reviews, features and how-to guides, plus special offers and competitions.