Database scaling is the process of adjusting a database system to handle increased data volume or user load by improving its capacity and performance.
Click to reveal answer
beginner
What are the two main types of database scaling?
The two main types are vertical scaling (adding more resources like CPU or RAM to a single server) and horizontal scaling (adding more servers to distribute the load).
Click to reveal answer
intermediate
Why does vertical scaling have limits?
Vertical scaling is limited by the maximum hardware capacity of a single machine and can become expensive or impractical beyond a point.
Click to reveal answer
intermediate
How does horizontal scaling help with data growth?
Horizontal scaling spreads data and requests across multiple servers, allowing the system to handle more data and users by adding more machines.
Click to reveal answer
advanced
What is sharding in database scaling?
Sharding is a horizontal scaling technique where data is split into smaller parts called shards, each stored on different servers to improve performance and capacity.
Click to reveal answer
Which scaling method involves adding more servers to handle increased data?
AHorizontal scaling
BVertical scaling
CCaching
DIndexing
✗ Incorrect
Horizontal scaling means adding more servers to distribute the load and data.
What is a limitation of vertical scaling?
AIt requires splitting data across servers
BIt is limited by hardware capacity
CIt always reduces latency
DIt is cheaper than horizontal scaling
✗ Incorrect
Vertical scaling is limited by the maximum hardware resources available on a single machine.
What does sharding do in a database?
ADuplicates data on all servers
BBacks up data regularly
CSplits data into parts stored on different servers
DCompresses data to save space
✗ Incorrect
Sharding splits data into smaller parts called shards, each stored on different servers.
Why is horizontal scaling preferred for very large data growth?
ABecause it uses a single powerful server
BBecause it reduces the number of servers needed
CBecause it avoids data replication
DBecause it distributes load across many servers
✗ Incorrect
Horizontal scaling distributes data and requests across multiple servers, handling large growth better.
Which of these is NOT a direct benefit of database scaling?
AIncreased downtime
BHandling more data
CImproved performance
DBetter user experience
✗ Incorrect
Database scaling aims to reduce downtime, not increase it.
Explain how horizontal and vertical scaling differ and why both are important for handling data growth.
Think about adding resources to one machine versus adding more machines.
You got /5 concepts.
Describe what sharding is and how it helps databases scale with growing data.
Imagine dividing a big book into chapters stored in different libraries.
You got /4 concepts.
Practice
(1/5)
1. Why do systems use database scaling when data grows larger?
easy
A. To keep data access fast and reliable
B. To reduce the amount of data stored
C. To make data harder to access
D. To delete old data automatically
Solution
Step 1: Understand the purpose of scaling
Database scaling is used to handle more data without slowing down or losing reliability.
Step 2: Identify the correct goal
The main goal is to keep data access fast and reliable as data grows.
Final Answer:
To keep data access fast and reliable -> Option A
Quick Check:
Scaling improves speed and reliability [OK]
Hint: Scaling keeps databases fast despite growth [OK]
Common Mistakes:
Thinking scaling reduces data size
Believing scaling deletes old data
Assuming scaling makes data harder to access
2. Which of the following is a correct example of vertical scaling in databases?
easy
A. Adding more servers to share the load
B. Upgrading a server with a faster CPU and more RAM
C. Splitting data into smaller parts across servers
D. Copying data to multiple servers for backup
Solution
Step 1: Define vertical scaling
Vertical scaling means improving one server's hardware like CPU or RAM.
Step 2: Match the option to vertical scaling
Upgrading a server with better CPU and RAM fits vertical scaling.
Final Answer:
Upgrading a server with a faster CPU and more RAM -> Option B
Quick Check:
Vertical scaling = better single server [OK]
Hint: Vertical scaling upgrades one server's hardware [OK]
Common Mistakes:
Confusing vertical with horizontal scaling
Thinking adding servers is vertical scaling
Mixing sharding with vertical scaling
3. Given a database system that uses sharding, what happens when data grows beyond one shard's capacity?
medium
A. The system slows down because all data is on one server
B. Replication copies data to the same shard
C. Data is deleted to keep the shard size small
D. New shards are added to distribute the data load
Solution
Step 1: Understand sharding
Sharding splits data across multiple servers or shards to spread load.
Step 2: What happens when one shard is full?
New shards are added to hold more data and keep performance.
Final Answer:
New shards are added to distribute the data load -> Option D
Quick Check:
Sharding adds shards as data grows [OK]
Hint: Sharding adds servers to handle more data [OK]
Common Mistakes:
Thinking data is deleted when shard is full
Believing replication happens on same shard
Assuming system slows down without adding shards
4. A database uses replication to improve read speed and backup. If replication is misconfigured, what problem might occur?
medium
A. Data inconsistency between primary and replicas
B. Faster writes on the primary database
C. Automatic deletion of all replicas
D. Sharding data across replicas
Solution
Step 1: Understand replication purpose
Replication copies data to replicas for speed and backup.
Step 2: Identify misconfiguration effects
If replication is wrong, replicas may not match primary, causing inconsistency.
Final Answer:
Data inconsistency between primary and replicas -> Option A
Quick Check:
Replication errors cause inconsistency [OK]
Hint: Misconfigured replication causes data mismatch [OK]
Common Mistakes:
Thinking replication speeds up writes
Assuming replicas get deleted automatically
Confusing sharding with replication
5. A company expects its user data to grow rapidly. Which combination of scaling techniques best handles this growth while ensuring fast reads and fault tolerance?
hard
A. Vertical scaling only, upgrading server hardware
B. Replication only, copying data to multiple servers
C. Horizontal scaling with sharding and replication
D. Deleting old data regularly to reduce size
Solution
Step 1: Analyze growth and requirements
Rapid data growth needs spreading data and fast access with backups.
Step 2: Match techniques to needs
Horizontal scaling adds servers; sharding splits data; replication copies data for speed and fault tolerance.