A distributed database system with a flexible JSON-like data model, designed for quick & easy query development & scalable, real-time data processing.
1. Flexible JSON-like data model. 2. Distributed architecture with easy replication and scalability. 3. Rich set of analytical tools for data profiling and monitoring.
From beginner basics to advanced concepts, this cheat sheet has everything you need to master MongoDB. It is filled with handy tips & commands for quick reference.
1. To show all databases show dbs 2. Switch or create a database use acme 3. Drop a database db.dropDatabase()
1. Finds all documents. db.docx.find().prettyPrint() 2. Finds one random document db.docx.findOne() 3. Displays the names of document. db.docx.find({}, {name:true, _id:false})
1. Count Rows db.docx.find().count() 2. Update one document db.docx.updateOne({"_id": 2}, {$set: {"title": 'revised title'}}) 3. Delete a Document db.docx.deleteOne({"_id" : 6})
1. List Indexes db.docx.getIndexes() 2. Drop Index db.docx.dropIndex("name_3") 3. Hide Indexes db.docx.hideIndex("name_3")
1. Listing a Collection’s Records db.collectionname.find() 2. Search in MongoDb Database db.comments.find({lang:'Python'}) 3. Find a Single Record db.collectionname.findOne({"field2": "content"})
Step Up Your Game with InterviewBit Web Stories