Term of the Moment

dynamic


Look Up Another Term


Redirected from: horizontal database partitioning

Definition: database partitioning


Splitting large databases into separate entities for faster retrieval.

Horizontal Partitioning and Sharding
Horizontal partitioning separates rows by key fields; for example, all Arizona records are maintained in one index and New Mexico records in another, etc., or account numbers from 00001 to 49999 in one, and 50000 to 99999 in another.

If each horizontal partition is stored on a separate server, the partition is called a "shard," and the process is "sharding." Databases that provide automatic sharding determine how to divide the database into chunks based on ranges of values as in the above examples or by computing hash values of the keys. The latter creates a more uniform distribution of the data.

Vertical Partitioning
Also known as "row splitting," vertical partitioning separates columns. For example, widely used columns are stored in one database, while columns that are accessed infrequently are stored in another.

Master/Slave Partitioning
This simple method is used when viewing updates in real time is not critical. The master server is used for all updating of the database (writing), and one or more slave servers are used as copies for reading. Periodically, the updates on the master are copied to the slaves. See shared nothing.