Microsoft SQL Server Certification Course
- 5k Enrolled Learners
- Weekend
- Live Class
MongoDB is a NoSQL database which stores data in the form of key-value pairs and has the ability to work in cross-platform model. Sharding is one of the concepts which is very important to MongoDB. In laymen terms, it means to break up large tabular data into smaller subsets.
So let us begin with the article,
When the data is so large, it can’t be stored and scaled in a single machine. It can be too expensive to store exponentially growing data in a single machine. Moreover, as the size of data increases, data storage in a single machine may not provide an acceptable read and write throughput.
Sharding is the process of storing data records across multiple machines. It provides support to meet the demands of data growth. It is not replication of data, but amassing different data from different machines. Sharding allows horizontal scaling of data stored in multiple shards. With Sharding, we can add more machines to meet the demands of growing data and the demands of read and write operations. The more machines you add, the more read and write operations your database can support.
Learn to query and manage databases like a pro in our SQL Training.
Find out our MS SQL Course in Top Cities
India | India |
SQL Training in Bangalore | SQL Course in Pune |
SQL Training in Chennai | SQL Course in Mumbai |
SQL Training in Hyderabad | SQL Course in Kolkata |
There are number of replica sets in a MongoDB cluster, each of which contains 3 or more mongodb nodes. There are multiple shards within the clusters. Mongos communicate with each of the Shards, and the App server in turn communicates with the query router, Mongos. This way the data is partitioned.
For example, if there are 6 million employee documents, they can’t be stored in a single machine as there is a limit to its storage capacity, and read and write throughput. In such a case, Sharding helps in storing and managing data across multiple shards. If data is to be horizontally divided across the 6 shards, based on the employee id of each employee, every shard will have 1 million employee ids. This way, the large set of data can be easily scaled.
Got a question for us? Mention them in the comments section and we will get back to you.
Related Posts:
MongoDB: The Database for Big Data Processing
Course Name | Date | Details |
---|---|---|
MongoDB Certification Training Course | Class Starts on 19th October,2024 19th October SAT&SUN (Weekend Batch) | View Details |
MongoDB Certification Training Course | Class Starts on 28th December,2024 28th December SAT&SUN (Weekend Batch) | View Details |
edureka.co