Intro to Mongodb


I came across MongoDB a few months ago and have taken decent strides to understand it. This post is to introduce MongoDB to the readers along with basic installation and setup steps on Ubuntu10.04.

MongoDB

  • Falls under the family of NoSQL database
  • Unlike relational database (row/column), its a document based database
  • Provides indexing, dynamic querying like relational databases
  • Database is a set of collections which is a set of documents. Documents are set of fields with each field being a key(string) – value pair (JSON based, called BSON in Mongo terms)
  • No joins and no queries on multiple table -> higher performance
  • High availability with replicated servers
  • Highly scalable because of data sharding (partitioning across servers)
  • Logical query language fitting to dynamic programming languages like Python

Installation

On Ubuntu10.04, I could install MongoDB with

 $sudo apt-get install mongodb

MongoDB Service

You can start/stop/restart MongoDB service on Ubuntu:

$sudo service mongodb start
$sudo service mongodb stop
$sudo service mongodb restart

Test of installation

ubuntu@ubuntu:~$ sudo service mongodb start
start: Job is already running: mongodb

ubuntu@ubuntu:~$ mongo
MongoDB shell version: 1.2.2
url: test
connecting to: test
type "exit" to exit
type "help" for help
>
Advertisements

One thought on “Intro to Mongodb

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s