Document Oriented Database

This is certainly the foremost. MongoDB is a database. That means, is a collection of data that facilitates easy access and update. MongoDB is a NoSQL / document oriented database. This means it is not a traditional structured database that stores data in formal tables and columns. Instead, it stores data in an unstructured form, as a collection of documents. Now what is the big deal? Is unstructured data more efficient? If that is the case, why did our ancestors take all the trouble of structuring data in form of tables? And if structuring was the right way to go, why is everyone moving to unstructured data? How can both be correct? Has something changed?

Yes a lot has changed. The data has changed. The volume of data has changed. The velocity of data has changed. The variety of data has changed. On the other hand, storage capacity, processing power as well as the search algorithms have changed. Because of slow velocity and consistency of the data being pushed into the database; because of higher latency of the database search; it made more sense to keep the data well organized so that the search would be quick enough. Today, the extreme velocity, variety and volume of the data leave you no time to organize it. Also, the improved search process allows you to afford the unstructured storage.

In simple words - when search was a bottleneck all databases were implemented in a way that would organize the data in a way that facilitates faster search. Today, the bottleneck is in absorbing and streamlining the high volume, variety and velocity of the data being pumped into the database. Naturally the database implementations have changed.

Collections and Documents

MongoDB stores its data in form of collections and documents. A MongoDB database is a container of collections. Each database gets its own set of files on the file system. A single MongoDB server typically has multiple databases. 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.

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. Any sensible developer would create a collection out of related documents. Even if they do not follow the same syntactic schema, they would be functionally related. But MongoDB does not insist on any such restriction.