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
>

One thought on “Intro to Mongodb

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.