MongoDB Tutorials

MongoDB Interview Questions and Answers

Explain how replication works in MongoDB? Across more servers the process of synchronizing data is called replication. Replication gives redundancy and growing data availability with more copies of data on different database servers. It Provide in protecting the database from the loss of a single server. How to create Schema in MongoDB and what are […]

MongoDB ObjectId

Even though we have been mentioning about MongoDB ObjectId  in all the previous section, we didn’t look well into what constitute a MongoDB ObjectId.  MongoDB ObjectId is an ObjectId and is a 12-byte BSON   having the accompanying structure: The initial 4 bytes are the  seconds since the Unix age The following 3 bytes are the […]

MongoDB Text Search and Rockmongo

At first Text Search was a trial excremental however beginning from the configuration 2.6, the same is empowered as default in MongoDB. Anyway if you are utilizing past version of MongoDB, you need to empower text search  with the below code: db.adminCommand({setParameter:true,textSearchEnabled:true}) Making Text Index Consider the accompanying under posts collection containing the post text and its tags: {"post_text": […]


GridFS is the MongoDB specification for putting away and recovering vast documents, for example, pictures, sound records, feature records, and so on. It is slightly a document framework to store records however its information is put away inside MongoDB collections. There are some examples provided here to showcase how GridFS achieves the feature. GridFS has […]

MongoDB Auto-Increment Sequence

Auto Increment Sequence in MongoDB is not a default feature. We  will automatically attain this by utilizing a counters collection as recommended by the MongoDB documentation. Utilizing counter Collection Consider the accompanying document. We need the _id field to be an auto-increment  number arrangement beginning from 1,2,3,4 upto n. {"_id":1,"product_name": "Mobile Phone", "class": "mobiles" } For this, […]

MongoDB Atomic Operations

MongoDB does not help in multi-document atomic transactions. Nonetheless, it does give atomic operations on a single document. So if a document has hundred fields the update query will either update all the fields or none, thus keeping up atomicity at document level. Model Data for Atomic Operations The prescribed methodology to keep up atomicity would be to keep all the […]

MongoDB – Covered and Analyzing Queries

What is a Covered Query? According to the authority MongoDB documentation, a secured inquiry is a question in which: all the fields in the inquiry are piece of a list and all the fields returned in the inquiry are in the same list Since all the fields introduce in the inquiry are piece of a […]

MongoDB Relationship Example

MongoDB has relationships and this shows how different documents are related to each other logically. These relationship can be designed through referenced and embedded ways. These relationship can be one to one , one to many, many to one or many to many. Here we will give examples of MongoDB relationship. Embedded Relationships In the embedded […]

MongoDB – Replication, Sharding and Backup

Here we’ll try to cover about Replication, Sharding and Backup in MongoDB. Replication Replication is the methodology of synchronizing data crosswise over different servers. Replication gives repetition and builds data accessibility with numerous duplicates of data on diverse database servers; replication ensures a database from the departure of a single  server. Replication likewise permits you to recuperate […]

MongoDB Query examples

Here we will go through the different mongoDB query.The mains query that are used are  insert,remove ,update and Projection. There are examples provided for each of the mongoDB query. The insert () Method To insert information into MongoDB accumulation, you have to utilize MongoDB’s insert () or save () method. Sentence structure Fundamental language structure of insert […]

MongoDB – Introduction

MongoDB is an open-source report database, and heading NoSQL database. MongoDB is written in C++, C and JavaScript. This tutorial will provide for you a view on MongoDB ideas required to make and convey a very adaptable and execution arranged database. This content is intended for Software Professional who is eager to learn MongoDB Database in basic […]