Is it Time to Join the NoSQL Movement?
Photo Credits: James Fee
The Battle Cry
There’s a new revolution brewing in the software industry, and it goes something like this…
For too long software developers have been oppressed by the tyranny of relational database! Are they really the right tool for every job? Should we really have to map our OO code to a relational DB?
Now the time has come to throw off those shackles and enter the free world of NoSQL! Who’s with me?…<sound of crickets chirping>
Ok. So maybe people aren’t quite ready to join the revolution yet, but let’s dig into this new movement and understand what it it.
What is it?
According to Wikipedia, NoSQL is:
an umbrella term for a loosely defined class of non-relational data stores that break with a long history of relational databases and ACID guarantees. Data stores that fall under this term may not require fixed table schemas, and usually avoid join operations. The term was first popularised in early 2009.
In other words, it’s not: SQL Server, mySQL or Oracle — the leading relational database engines in the market.
By contrast, NoSql databases usually involve persisting objects to the database through key-value pairs, XML and/or JSON. They are often called document databases or object-oriented databases.
The benefits are primarily two-fold:
- Developer Efficiency: Because you don’t need to map your objects to database tables, the classic object-relational impedance mismatch is gone. This allows developers to simply focus on building their objects persisting them to the database as is.
- Database Performance: When you have a database that is nothing but key-value pair lookups it becomes lightning fast which is why NoSQL databases are used by the largest websites out there like: Facebook (Cassandra), Amazon (Dynamo) & Google (BigTable)
So if you’re convinced that NoSQL is the wave of the future, here’s how you get started.
How Do I Get Started?
The first choice you have to make is which NoSQL DB you’d like to use. From what I’ve read, here are the most common options:
- MongoDB: From the MongoDB site:”MongoDB (from "humongous") is a scalable, high-performance, open source, schema-free, document-oriented database. Written in C++”. MongoDB seems to be a good choice if you are working in rails because of a MongoMapper which makes it easy to plug rails code into a MongoDB. There are also a series of Tekpub screencasts for using MongoDB with Rails
- CouchDB: From the CouchDB site: “CouchDB is a document-oriented database…[that] provides a RESTful JSON API than can be accessed from any environment that allows HTTP requests.” It does seem like CouchDB is not ready for production yet and most people are just experimenting with it at this point.
- DB40: From the DB40 site: “db4o is the open source object-oriented database that enables Java and .NET developers to store and retrieve any application object with only one line of code, eliminating the need to predefine or maintain a separate, rigid data model.” DB40 does seem to be production ready (it even supports LINQ) and Rob Conery has a great series of articles on getting started with it in .NET
Does the NoSql movement have legs or is it just the most recent shiny object for developers to talk about?
I don’t know, but I like the idea of looking at new options for database engines, and plan to try them out in some test projects. I think we’re still at a point where we spend far to much time writing CRUD code. Maybe NoSql DBs can solve that?
-
http://nosql.mypopescu.com Alex Popescu
-
Bryant

