S Harding
S Harding
SHARDING
Shard means “a small part of a whole”. Hence sharding means dividing
larger part into smaller parts.
In DBMS, Sharding is a type of DataBase Partitioning in which a large
databse is divided or partitioned into smaller data also known as Shards.
These shards are not only smaller but also faster and easily manageable.
3
SHARDING
Sharding is a method for distributing a single dataset across
multiple databases, which can then be stored on multiple machines.
This allows for larger datasets to be split in smaller chunks and
stored in multiple data nodes, increasing the total storage capacity
of the system.
TYPES OF SCALING 4
• VERTICAL SCALING
• HORIZONTAL SCALING
VERTICAL SCALING
» When new resources are added in the existing system to meet the
expectation, it is known as vertical scaling.
» Vertical scaling is based on the idea of adding more power(CPU,
RAM) to existing systems, basically adding more resources.
» Vertical scaling is not only easy but also cheaper than Horizontal
Scaling. It also requires less time to be fixed.
HORIZONTAL SCALING
» When new server racks are added in the existing system to meet the
higher expectation, it is known as horizontal scaling.
» Horizontal scaling is based on the idea of adding more machines into
our pool of resources.
» Horizontal scaling is difficult and also costlier than Vertical Scaling. It
also requires more time to be fixed.
NEED FOR SHARDING 8
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.
FEATURE OF SHARDING 9
H BASE
H BASE 12
“
THANK YOU!!!