Introduction to sharding

Introduction to sharding Sharding: Sharding is a process of distributing the data across multiple machines. The distribution is done based on the specific key called the shard key. This allows MongoDB to handle large datasets and higher read/write operations. MongoDB supports horizontal scaling through Sharding.… Read More

Indexes in MongoDB

Indexes in MongoDB Index: Index is a data structure that enhances the data retrieval efficiency by storing the small portion of the collection’s data along with the pointers to their physical location in the collection. 👉 MongoDB indexes use B-tree data structure. 👉 Indexes help… Read More

Install MongoDB in Amazon Linux VM

Install MongoDB in Amazon Linux VM: Step-1: Create a Linux virtual machine in AWS. Step-2: After creating it connect it through the putty or mobaXterm. Step-3: Run “sudo su“ to get all the root privileges.

Step-4: To know about the version and its details… Read More

MongoDB Commands On Operators

MongoDB Commands On Operators To create a collection called student data.

To get all the documents in a collection called student data without any filter.

To get all the documents whose total marks is equals to 560.

To get all the documents… Read More

MongoDB Query Operators Part-3

MongoDB Query Operators Part-3 Evaluation Query Operators MongoDB Evaluation operators are used to evaluate the structure of overall data or the individual fields in the document. They are of six types of Evaluations operators 1. mod ($mod) 2. text ($text) 3. where ($where) 4. jsonSchema… Read More

MongoDB Query Operators Part-2

MongoDB Query Operators Part-2 Element Query Operator This operator is used to find the documents based on the datatypes and the fields in a document. There are two element query operators. 1. exists ($exists) 2. type ($type) 1. exist ($exist): This operator is used to… Read More

MongoDB Query Operators

MongoDB Query Operators There are different types of Operators available in MongoDB which are used to filter the data. 1 – Comparison operators 2 – Logical operators 3 – Element operators 4 – Evaluation operators 5 – Geospatial operators 6 – Array operators 7 –… Read More

MongoDB CRUD Operations

MongoDB CRUD Operations 1 – To create a new database called sample data. Atlas atlas-dsrabt-shard-0 [primary] myFirstDatabase> use sample data. 2 – To create a new collection called students. Atlas atlas-dsrabt-shard-0 [primary] sampledata> db.createCollection(“students”). 3 – To insert one document in to the collection called… Read More