0% found this document useful (0 votes)
35 views1 page

Lec 18 Notes

Notes for nosql

Uploaded by

gotax
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views1 page

Lec 18 Notes

Notes for nosql

Uploaded by

gotax
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

in clustering all node same db

data huge
in partionaing all node diff data
request huge

LEC-18: Partitioning & Sharding in DBMS (DB Optimisation)

1. A big problem can be solved easily when it is chopped into several smaller sub-problems. That is what the partitioning technique does. It divides a
big database containing data metrics and indexes into smaller and handy slices of data called partitions. The partitioned tables are directly used by
SQL queries without any alteration. Once the database is partitioned, the data definition language can easily work on the smaller partitioned slices,
instead of handling the giant database altogether. This is how partitioning cuts down the problems in managing large database tables.

2. Partitioning is the technique used to divide stored database objects into separate servers. Due to this, there is an increase in performance,
controllability of the data. We can manage huge chunks of data optimally. When we horizontally scale our machines/servers, we know that it gives us
a challenging time dealing with relational databases as it’s quite tough to maintain the relations. But if we apply partitioning to the database that is
already scaled out i.e. equipped with multiple servers, we can partition our database among those servers and handle the big data easily.

3. Vertical Partitioning
1. Slicing relation vertically / column-wise.

2. Need to access different servers to get complete tuples.

4. Horizontal Partitioning
1. Slicing relation horizontally / row-wise.

2. Independent chunks of data tuples are stored in different servers.

5. When Partitioning is Applied?


1. Dataset become much huge that managing and dealing with it become a tedious task.

p
2. The number of requests are enough larger that the single DB server access is taking huge time and hence the system’s response time become
high.
cause lock and work
6. Advantages of Partitioning
1. Parallelism

el
2. Availability

3. Performance

4. Manageability

5. Reduce Cost, as scaling-up or vertical scaling might be costly.

7. Distributed Database
eH
1. A single logical database that is, spread across multiple locations (servers) and logically interconnected by network.

2. This is the product of applying DB optimisation techniques like Clustering, Partitioning and Sharding.

3. Why this is needed? READ Point 5.


same db , row -col ,
8. Sharding
1. Technique to implement Horizontal Partitioning.

2. The fundamental idea of Sharding is the idea that instead of having all the data sit on one DB instance, we split it up and introduce a
Routing layer so that we can forward the request to the right instances that actually contain the data.

3. Pros
1. Scalability

od

2. Availability

4. Cons
1. Complexity, making partition mapping, Routing layer to be implemented in the system, Non-uniformity that creates the necessity of Re-
Sharding

2. Not well suited for Analytical type of queries, as the data is spread across different DB instances. (Scatter-Gather problem)
C

Consider a Table in database with 1 Million rows and 100 columns In Partitioning you
can divide the table into 2 or more table having property like:

1. 0.4 Million rows(table1), 0.6 million rows(table2)

2. 1 Million rows & 60 columns(table1) and 1 Million rows & 40 columns(table2)

There could be multiple cases like that

This is general partitioning

But Sharding refer to 1st case only where we are dividing the data on the basis of rows.

sharding is called row wise partionsing

You might also like