Introduction to  Mongo DB
BY 
RANJITH & DIVAKAR 


NoSQL


 What is MongoDB?

Definition: 

  • MongoDB is an open source, document-oriented database designed with both scalability and developer agility in mind. 

  • Instead of storing your data in tables and rows as you would with a relational database, in MongoDB you store JSON-like documents with dynamic schemas(schema-free, schemaless)

 Installation

Download Mongo DB 

http://www.mongodb.org/downloads


GUI TOOL

http://robomongo.org/download.html


Start Mongo DB

  •   open command prompt    
  •  cd mongo db (locate mongo db folder)
  •   For starting mongoDB use this command .
 mongod.exe –Dbpath “d:\mongoDb\data\db1(Mongo db data path)”

Document store


Embedded Document  

  • Embedding is the nesting of objects and arrays inside a JSON document. 

  • Links are references between documents. Embedding is a bit like "prejoined" data. 

  • Operations within a document are easy for the server to handle; these operations can be fairly rich.

 Sharding

  • Sharding is the process of storing data records across multiple machines and is MongoDB’s approach to meeting the demands of data growth. 

  • As the size of the data increases, a single machine may not be sufficient to store the data nor provide an acceptable read and write throughput. 

  • With sharding, you add more machines to support data growth and the demands of read and write operations.

Document store


  Connecting Mongo DB

  • MongoClient mongoClient = new MongoClient( "localhost" , 27017 );

  • DB db = mongoClient.getDB( "mydb" );

CRUD


OPERATIONS


Features


 Theory of no sql


 

What is Grid FS ?

About GRIDFS


  • GridFS is a specification for storing and retrieving files that exceed the BSON-document size limit of 16MB.



 GRIDFS Collections

  • Instead of storing a file in a single document.

  •  GridFS divides a file into parts, or chunks and stores each of those chunks as a separate document.

  • chunks stores the binary chunks

  • files stores the file’s metadata

Thank you 


Any QUERIES?????

mongodb

By divakar137

mongodb

  • 991