MongoDB introduction

MongoDB 
MongoDB is a cross-platform, document oriented database that provides, high performance, high availability, and easy scalability. MongoDB works on concept of collection and document. MongoDB is an open-source document database that provides high performance, high availability, and automatic scaling.
In simple words you can say that - Mongo DB is a document oriented database. It is an open source product, developed and supported by a company named 10gen.
MongoDB is available under General Public license for free and it is also available under Commercial license from the manufacture.
The manufacturing company 10 gen has given the definition of Mongo DB:
"Mongo DB is scalable, open source, high performance, document oriented database." - 10 gen
MongoDB was designed to work with commodity servers. Now it is used by company of all sizes, across all industry.
MongoDB Database 
Database is a physical container for collections. Each database gets its own set of files on the file system. A single MongoDB server typically has multiple databases.
MongoDB  Collection
Collection is a group of MongoDB documents. It is the equivalent of an RDBMS table. A collection exists within a single database. Collections do not enforce a schema. Documents within a collection can have different fields. Typically, all documents in a collection are of similar or related purpose.
MongoDB  Document
A document is a set of key-value pairs. Documents have dynamic schema. Dynamic schema means that documents in the same collection do not need to have the same set of fields or structure, and common fields in a collection's documents may hold different types of data.
The following table shows the relationship of RDBMS terminology with MongoDB.
RDBMS
MongoDB
Database
Database
Table
Collection
Tuple/Row
Document
column
Field
Table Join
Embedded Documents
Primary Key
Primary Key (Default key _id provided by mongodb itself)
Database Server and Client
Mysqld/Oracle
mongod
mysql/sqlplus
mongo

Document Example
Following example shows the document structure of a blog site, which is simply a comma separated key value pair.
{
   _id: ObjectId(7df78ad8902c)
   title: 'MongoDB Overview',
   description: 'MongoDB is no sql database',
   by: 'tutorials point',
   url: 'http://www.tutorialspoint.com',
   tags: ['mongodb', 'database', 'NoSQL'],
   likes: 100,
   comments: [
      {
         user:'user1',
         message: 'My first comment',
         dateCreated: new Date(2011,1,20,2,15),
         like: 0
      },
      {
         user:'user2',
         message: 'My second comments',
         dateCreated: new Date(2011,1,25,7,45),
         like: 5
      }
   ]
}

_id is a 12 bytes hexadecimal number which assures the uniqueness of every document. You can provide _id while inserting the document. If you don’t provide then MongoDB provides a unique id for every document. These 12 bytes first 4 bytes for the current timestamp, next 3 bytes for machine id, next 2 bytes for process id of MongoDB server and remaining 3 bytes are simple incremental VALUE.




Purpose of MongoDB
This may be a very genuine question that - "what was the need of MongoDB although there were many databases in action?"
This is a very simple answer:
All the modern applications require big data, fast features development, flexible deployment and the older database systems not enough competent, so the MongoDB was obviously needed.
Main purpose to build MongoDB:
ü  Scalability
ü  Performance
ü  High Availability
ü  Scaling from single server deployments to large, complex multi-site architectures.

Key points.
ü  Develop Faster
ü  Deploy Easier
ü  Scale Bigger