MongoDB Introduction




MongoDB is an open-source, cross-platform , document oriented database. It fall under NoSQL database family, written in C++.  It is used for high volume data storage.

MongoDB is a highly scalable database. In the real world, companies have created 100+ nodes with around millions of documents within the database.

MongoDB has database/s. Mostly multiple DBs in the real world.

Each DB has multiple collections. A collection is equivalent to Table of RDBMS.

Each collections stores documents. The document is equivalent to records/tuple of RDBMS.
Structure of the document is  JSON (JavaScript Object Notation).

NO-SQL db is schema-less database. 

DataModle within MongoDB allows you to represent hierarchical relationship, store arrays and other complex structure.

Document size limit : You could not load any document of size bigger than 16 MB in collection. If you have document bigger than that, you need to use GridFS(an api provided by MongoDB)
GridFS breaks the file into multiple smaller chunk, called fschunk and load the data.
Good example of big file is video, picture, pdf etc.
Each chunk is default to 255 KB in size


Mongo stores complex, denormalized documents, stored and retrieved as collections of arbitrary JSON structures. Mongo tops off this flexible storage strategy with a powerful query mechanism not constrained by any predefined schema.

"_id"
The ObjectId is always 12 bytes, composed of a timestamp, client machine ID, client process ID, and a 3-byte incremented counter.







Comments

Popular posts from this blog

MongoDB - Sharding