Getting started with MongoDB

MongoDB is currently the most popular NoSQL database out there to store "Big Data". The name "Mongo" come from humongous (means huge). MongoDB stores data as JSON documents as opposed to records in a relational table. A collection of documents in MongoDB is similar to a table in traditional databases. Some useful features MongoDB provides includes ad hoc document based queries, indexing, load balancing, replication across LANs and WANs, mapreduce algorithms for data processing and aggregation and auto-sharding (scales horizontally by adding extra machines).

Many companies (MetLife, eBay, LinkedIn, The New York Times to name a few) have already adopted MongoDB for their data management needs. The insurance company MetLife created a facebook like interface called The Wall which provides "360-degree, consolidated view of MetLife customers, including policy details and transactions across lines of business".

To get started with MongoDB, try the online MondoDB shell at http://try.mongodb.org/. It has a very short tutorial on how to perform basic database operations like, insert, update and retrieve records.


To create a document in the users collection, enter:
db.users.insert({name:'John', age:30, email:'john@example.com'});

Now to select all users you would write:
db.users.find();

Once you are done with the tutorial, you might want to install MongoDB on your machine. Actually, you can run it without installing. Just download the appropriate zip file for your OS. Unzip the folder on your machine and run the mongod.exe from command prompt. It would start the database server. From another command window, start mongo.exe and you would have the MongoDB shell ready to execute database commands. You can find the detailed installation guide here.

Comments

Popular posts from this blog

Power On Your Computer by Keyboard, Mouse or Alarm

Comet Lulin Comes Closer

Into the World of Computer Gaming