DataSys+ Database Sharding and Partitioning Strategies Quiz

Reviewed by Joshua Gelman
Joshua Gelman, CompTIA Certified |
CompTIA Expert
Review Board Member
Joshua G. is a cybersecurity specialist and instructor with over a decade of hands-on experience in incident response, secure system design, and risk management. He holds CompTIA Security+, CySA+, SecurityX (CASP+), CSAP, and CSAE certifications, as well as the CISSP, and teaches cybersecurity as an adjunct instructor at Texas A&M Engineering Extension Service (TEEX). He earned his MS in Information Science from the University of Pittsburgh.
, CompTIA Certified
By Thames
T
Thames
Community Contributor
Quizzes Created: 11982 | Total Attempts: 187,298
| Questions: 19 | Updated: Aug 14, 2026
Please wait...
Question 1 / 20
🏆 Rank #-- ▾
0 %
0/100
Score 0/100

1. What is a primary advantage of consistent hashing in sharding?

Explanation

Consistent hashing assigns data to points on a hash ring, so adding or removing a shard typically requires remapping only a small portion of the data. This minimizes data movement compared with schemes that redistribute data across most or all shards.

Submit
Please wait...
About This Quiz
DataSys+ Database Sharding and Partitioning Strategies Quiz - Quiz

This quiz evaluates your understanding of database sharding and partitioning strategies essential for managing large-scale data systems. You'll explore horizontal and vertical partitioning, shard key selection, consistency challenges, and real-world implementation patterns. Designed for professionals preparing for the CompTIA DataSys+ certification, this assessment reinforces critical skills for optimizing database performance... see moreand scalability in distributed environments. see less

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. Which scenario most benefits from sharding?

Explanation

Sharding divides a large dataset across multiple servers, distributing storage and workload so capacity can grow horizontally. It is especially useful when one server can no longer handle the volume of data or requests efficiently. Small databases and single-server setups typically do not need this added complexity.

Submit

3. True or False: A shard key can be changed after data is distributed.

Explanation

A shard key determines how documents are partitioned and routed across shards. Once data has been distributed using that key, it cannot simply be changed in place; doing so would require a resharding or data-migration operation. Choose the shard key carefully before distributing the data.

Submit

4. In list-based partitioning, data is divided based on ____.

Explanation

List-based partitioning divides data according to specific, predefined values in a chosen column. Each partition contains rows whose values match the values assigned to it.

Submit

5. What is the main trade-off of vertical partitioning?

Explanation

Vertical partitioning divides a table’s columns into separate partitions, often based on how they are accessed. Queries that need fields stored in different partitions must join those partitions, adding complexity and potentially slowing retrieval compared with reading all required data from a single table.

Submit

6. Resharding is necessary when ____.

Explanation

Resharding redistributes data across a database cluster when its shard configuration changes. Adding shards increases capacity, while removing shards reduces it; in either case, data must be reassigned so it remains balanced and accessible across the updated set of shards.

Submit

7. Which sharding strategy is most resilient to hotspot issues?

Explanation

Hash-based sharding with consistent hashing spreads keys across shards using their hash values, reducing the chance that sequential or clustered values overload a single shard. When shards are added or removed, consistent hashing limits how many keys need to move. It cannot eliminate hotspots caused by an exceptionally popular individual key, but it is generally more resilient than range- or time-based partitioning.

Submit

8. True or False: Horizontal partitioning can be applied to a single database server.

Explanation

True. Horizontal partitioning divides a table’s rows into smaller subsets, often according to a key or range. These partitions can all reside on the same database server; the technique does not require data to be distributed across multiple servers. It can help organize data and improve query or maintenance performance.

Submit

9. In a sharded environment, a ____ is a separate database instance containing a subset of data.

Explanation

A shard is an independent database instance that stores only a portion of the overall dataset, allowing data to be distributed across multiple instances.

Submit

10. Cross-shard queries present which challenge?

Explanation

Cross-shard queries must retrieve and combine data stored across multiple shards. This requires extra network communication and coordination among the shards, which can increase query latency and overhead.

Submit

11. What is the primary difference between horizontal and vertical partitioning?

Explanation

Horizontal partitioning splits a table into subsets of rows, typically grouping records by a range or value. Vertical partitioning splits a table into subsets of columns, often keeping related attributes together. Both techniques distribute data, but they divide it along different dimensions: horizontal by records and vertical by fields.

Submit

12. Directory-based sharding maintains a ____ that maps shard keys to shard locations.

Explanation

A directory-based sharding system uses a lookup table to associate each shard key with the location of the shard holding its data. When a request arrives, the system consults this table to route it to the appropriate shard, rather than determining the location through a fixed key range or hashing rule.

Submit

13. True or False: Vertical partitioning always improves query performance.

Explanation

Vertical partitioning divides a table’s columns into separate groups, which can help when queries access only a subset of columns. However, queries needing columns from multiple groups may require joins, adding overhead. Its impact depends on the workload and database design, so it does not always improve query performance.

Submit

14. Which partitioning strategy is best for queries that filter by date range?

Explanation

Range partitioning groups records according to ordered date intervals, such as days, months, or years. When a query filters for a date range, the database can scan only the partitions that overlap that interval instead of examining the entire dataset, improving query efficiency.

Submit

15. Hash-based sharding uses a ____ function to determine shard placement.

Explanation

Hash-based sharding applies a hash function to a record’s key and uses the resulting value to select a shard. This provides a consistent way to distribute data across shards.

Submit

16. What is a hot shard problem?

Explanation

A hot shard occurs when data or requests are distributed unevenly, concentrating a disproportionate share of traffic on one shard. That shard can become a performance bottleneck, increasing latency or limiting throughput while other shards remain underused. Better partitioning, rebalancing, or distributing frequently accessed data can help reduce the imbalance.

Submit

17. In range-based sharding, data is distributed based on ____.

Explanation

Range-based sharding divides data into shards according to intervals of a chosen shard key. Each record is assigned to the shard whose value range includes its key, helping organize and query data by ranges.

Submit

18. Sharding introduces which major consistency challenge?

Explanation

When data is split across shards, a single operation may need to update records stored on multiple servers. Keeping those updates atomic and consistent requires coordination, such as distributed transactions, which can add latency and complexity. This is a key consistency challenge of sharding, unlike concerns such as disk usage or indexing.

Submit

19. Which factor is most critical when selecting a shard key?

Explanation

A shard key should distribute data evenly across shards to avoid hotspots and balance storage and workload. It should also align with common query patterns so requests can target the relevant shards efficiently, reducing unnecessary cross-shard operations.

Submit
×
Saved
Thank you for your feedback!
View My Results
Joshua Gelman |CompTIA Certified |
CompTIA Expert
Joshua G. is a cybersecurity specialist and instructor with over a decade of hands-on experience in incident response, secure system design, and risk management. He holds CompTIA Security+, CySA+, SecurityX (CASP+), CSAP, and CSAE certifications, as well as the CISSP, and teaches cybersecurity as an adjunct instructor at Texas A&M Engineering Extension Service (TEEX). He earned his MS in Information Science from the University of Pittsburgh.
Cancel
  • All
    All (19)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
What is a primary advantage of consistent hashing in sharding?
Which scenario most benefits from sharding?
True or False: A shard key can be changed after data is distributed.
In list-based partitioning, data is divided based on ____.
What is the main trade-off of vertical partitioning?
Resharding is necessary when ____.
Which sharding strategy is most resilient to hotspot issues?
True or False: Horizontal partitioning can be applied to a single...
In a sharded environment, a ____ is a separate database instance...
Cross-shard queries present which challenge?
What is the primary difference between horizontal and vertical...
Directory-based sharding maintains a ____ that maps shard keys to...
True or False: Vertical partitioning always improves query...
Which partitioning strategy is best for queries that filter by date...
Hash-based sharding uses a ____ function to determine shard placement.
What is a hot shard problem?
In range-based sharding, data is distributed based on ____.
Sharding introduces which major consistency challenge?
Which factor is most critical when selecting a shard key?
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!