Using Groovy to access MongoDB
MongoDB (http://www.mongodb.org) is a document-oriented database written in C++ with RDBMS-like features such as indexing and replication. It is developed and supported by 10gen.
MongoDB is very popular mainly for its simplicity: documents are created as JSON-like records (key/value pairs with a rich data type model) and the interface is simple enough to be used directly from JavaScript. It has been designed for scalability in mind. Its document-oriented data model allows it to automatically split up data across multiple servers, letting developers focus on application logic instead of scaling up the data store.
Other very useful features of MongoDB are built-in support for Map/Reduce-style aggregation and geospatial indexes.
This recipe will show you how to execute CRUD-like operations on a MongoDB instance and how to search for data.
Getting ready
MongoDB installation is quite simple, especially if you are on Linux or OS X, where you can use a package manager...