BY
RANJITH & DIVAKAR
NoSQL
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)
Download Mongo DB
http://www.mongodb.org/downloads
GUI TOOL
http://robomongo.org/download.html
- 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
- 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 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
- MongoClient mongoClient = new MongoClient( "localhost" , 27017 );
- DB db = mongoClient.getDB( "mydb" );
- GridFS is a specification for storing and retrieving files that exceed the BSON-document size limit of 16MB.
- chunks stores the binary chunks
- files stores the file’s metadata