55b: Horizontal Partitioning (Range-Based Partitioning)

In this mechanism, we use range-based partitioning. We split the data to multiple databases by range while keeping the database scheme constant (i.e., using the same columns in every database table). For example, if we have a dictionary database, we can divide one extensive database into multiple ones by their first letter. So, words starting with A get into one database, and B gets into another. Our range key is the wordโ€™s first letter. The partitions can have different volumes of data. For example, the number of words starting with E is much higher than those starting with X. To balance these conditions, we either merge multiple letters into one database or split E into multiple databases by using the second letter as a secondary index. The advantage of using a range is querying more entries in ranges is much easier. The disadvantage is accessing words in the E database will be much more frequent, and it can have a high load while other databases stand idly. To solve this problem, we can use something else other than the first letter of the word as a key. Deciding which keys to use is the difficult part of this partitioning. Either the database administrator can choose partition boundaries manually, or the database can choose them automatically.


If you're unfamiliar with Zettelkasten: These notes are atomic. The aim is to have one idea in a note. The connections between notes are as important as the notes themselves.

Reply via email

or comment below.