Sharding is a very important concept which helps the system to keep data into different resources according to the sharding process.
The word “Shard” means “a small part of a whole“. Hence Sharding means dividing a larger part into smaller parts.
In DBMS, Sharding is a type of DataBase partitioning in which a large DataBase is divided or partitioned into smaller data, also known as shards. These shards are not only smaller, but also faster and hence easily manageable.
Need for Sharding:
Consider a very large database whose sharding has not been done. For example, let’s take a DataBase of a college in which all the student’s record (present and past) in the whole college are maintained in a single database. So, it would contain very very large number of data, say 100, 000 records.
Now when we need to find a student from this Database, each time around 100, 000 transactions has to be done to find the student, which is very very costly.
Now consider the same college students records, divided into smaller data shards based on years. Now each data shard will have around 1000-5000 students records only. So not only the database became much more manageable, but also the transaction cost of each time also reduces by a huge factor, which is achieved by Sharding.
Hence this is why Sharding is needed.
Features of Sharding:
- Sharding makes the Database smaller
- Sharding makes the Database faster
- Sharding makes the Database much more easily manageable
- Sharding can be a complex operation sometimes
- Sharding reduces the transaction cost of the Database
GeeksforGeeks has prepared a complete interview preparation course with premium videos, theory, practice problems, TA support and many more features. Please refer Placement 100 for details
- Problems due to database unavailability
- Difference between Cassandra and MongoDB
- Difference between ALTER and UPDATE Command in SQL
- Cartesian Product Operation in Relational Algebra
- Multivalued Dependency (MVD) in DBMS
- SELECT Operation in Relational Algebra
- The CAP Theorem in DBMS
- Job Control Language (JCL) Utilities
- Flashback Queries
- Difference between SQL and HiveQL
- Difference between Cassandra and MySQL
- Difference Between MySQL and MariaDB
- Difference between DELETE, DROP and TRUNCATE
- PROJECT Operation in Relational Algebra
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.