In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Data sharding can be divided into two modes according to the type of sharding rules. One is to split into different databases (hosts) according to different tables (or schemas), which can be called vertical (vertical) splitting of data; the other is to divide the data in the same table according to the logical relationship of the data in the table.
Data is split into multiple databases (hosts) according to certain conditions, and this segmentation is called horizontal (horizontal) segmentation of data.
vertical slicing
A database consists of many tables, each table corresponding to different services. Vertical segmentation refers to classifying tables according to services and distributing them to different databases, so that data or pressure is shared among different databases, as shown in the following figure:
Advantages and disadvantages of vertical segmentation:
Advantages:
After splitting, the business is clear and the splitting rules are clear.
Easy integration or expansion between systems.
Data maintenance is simple.
Disadvantages:
Some business tables cannot be joined and can only be solved through interfaces, which increases the complexity of the system.
Due to the different limitations of each service, there is a single database performance bottleneck, which is not easy to expand data and improve performance.
Complex transactions.
Because vertical segmentation is to disperse tables into different libraries according to service classification, some service tables will be too large, and there will be bottlenecks in reading, writing and storage in a single library, so horizontal segmentation is required.
Split it up to solve it.
horizontal slicing
Compared to vertical splitting, horizontal splitting does not classify tables, but disperses them into multiple libraries according to some rules of a field, and each table contains a part of data. Simply put, we can understand horizontal splitting of data as splitting according to data rows, that is, splitting some rows in a table into a database and cutting some other rows.
Divided into other databases, as shown below:
Advantages and disadvantages of horizontal segmentation:
Advantages:
Split rules abstract well, join operation can basically do database.
There is no single database big data, high concurrency performance bottleneck.
There are fewer applications.
The stability and load capacity of the system are improved.
Disadvantages:
Split rules are difficult to abstract.
Fragment transaction consistency is difficult to solve.
The difficulty of data expansion and maintenance are extremely large.
Cross-library join performance is poor.
The common features and disadvantages of vertical segmentation and horizontal segmentation are:
Introducing the problem of distributed transactions.
Cross-node join problem.
Cross-node merge sort paging problem.
Multiple data source management issues.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.