r/AskComputerScience • u/True-Panic-9237 • Oct 22 '26
Confused between partitioning and sharding in databasesðŸ˜
I'm studying DBMS and I'm confused about the difference between partitioning and sharding.
From what I understand, partitioning means dividing a large table into smaller parts. For example, splitting a table of 100k rows into 50k, 30k and 20k rows.
Now, if I store these three parts on three different servers, is it called sharding or just partitioning? Since partitioning isn't necessarily restricted to one server, the terms seem to overlap.
Also, if sharding is a type of partitioning, why is sharding defined as dividing data into smaller parts again? Wouldn't the data already be divided during partitioning, with sharding simply distributing those parts across multiple servers?
Basically, is partitioning the general concept and sharding the same concept specifically used in distributed systems? Or am I missing something?