0
0
DBMS Theoryknowledge~5 mins

Sharding and partitioning in DBMS Theory - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is partitioning in databases?
Partitioning is the process of dividing a large database table into smaller, more manageable pieces called partitions. Each partition holds a subset of the data, often based on a specific column value like date or region.
Click to reveal answer
beginner
Define sharding in simple terms.
Sharding is a type of database partitioning where data is split across multiple servers or machines. Each shard holds a portion of the data, helping to spread the load and improve performance.
Click to reveal answer
intermediate
How does sharding differ from partitioning?
Partitioning divides data within a single database or server into parts, while sharding splits data across multiple servers or machines. Sharding is a form of horizontal scaling, whereas partitioning is often within one system.
Click to reveal answer
beginner
Give a real-life example of when sharding is useful.
Imagine a social media app with millions of users. Sharding lets the app store user data on different servers based on user location or ID, so no single server gets overloaded and the app runs faster.
Click to reveal answer
intermediate
What are common ways to partition data?
Data can be partitioned by range (e.g., dates), list (e.g., countries), or hash (using a function to evenly distribute data). These methods help organize data for faster access and easier management.
Click to reveal answer
What does sharding primarily help with?
ACompressing data to save space
BDistributing data across multiple servers
CEncrypting database data
DBacking up data regularly
Which of these is a common partitioning method?
ABackup partitioning
BEncryption partitioning
CRange partitioning
DCompression partitioning
Partitioning usually happens within:
AA single database or server
BMultiple servers worldwide
COnly cloud databases
DBackup storage systems
Which scenario best fits sharding?
ABacking up data to an external drive
BSplitting a table into smaller parts on one server
CEncrypting sensitive data in a database
DA large website spreading user data across servers
Hash partitioning means:
AUsing a function to evenly distribute data
BDividing data by date ranges
CGrouping data by country names
DEncrypting data with a hash
Explain the difference between sharding and partitioning in databases.
Think about where the data is divided and why.
You got /4 concepts.
    Describe a real-life example where sharding would improve a system's performance.
    Consider popular apps or websites with many users.
    You got /4 concepts.