Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
As a database grows in size, maintaining acceptable performance becomes more complex. Partitioning is one method you use to help manage large and busy databases. So what is database partitioning? Database partitioning is splitting data across multiple database servers. Partitioning is always done by consistent method so you always know where the data is. There are several different methods that you can use. One partitioning method you can use is a range. For instance, if you had your database sorted alphabetically you could have records A through L on one partition, M through Q on another, and R through Z on a third.
Another method for partitioning is a list. If you were building a database of books you could categorize them. You can have textbooks on one partition, cookbooks on another and sci-fi books on a third. And finally, you could use a hash as a partition method. With a hash you pass a value into a function, and it returns a value to determine the membership. So why would you partition in the first place? One reason might be storage limitations. If you have a very large dataset, that entire set might not fit on one database server.
Another common reason is for performance. When you split the load between partitions, it can make it faster to write to the database. And then finally, you might want to partition for availability. Placing your data on separate partitions insures that you're always going to be able to get to the data even if one of the partitions gets busy. Although there are scenarios where you would want to partition your database, there are also scenarios where you would not. When your dataset is small, there's no reason to partition. It will only increase the complexity of your database server.
Partitioning in relational databases and NoSQL databases is similar. Relational databases can be partitioned horizontally or vertically. Horizontal partitioning, which is also known as sharding, puts different rows on different partitions. Vertical partitioning on the other hand, puts different columns on different partitions. Partitioning non-relational databases depends on the database type. Key value and document databases are typically partitioned horizontally. On the other hand, tabular databases can be horizontally and vertically partitioned.
Many NoSQL databases are designed with partitioning in mind, however smaller databases may not need partitioning. Understanding how partitioning works is key to making informed decisions about database performance.
Get unlimited access to all courses for just $25/month.Become a member
61 Video lessons · 92848 Viewers
82 Video lessons · 104235 Viewers
71 Video lessons · 75940 Viewers
56 Video lessons · 107297 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.