When I mentioned the expansion of the database system, I actually only talking to the database system partition or divide, so that you can use those parts, to assign them to a separate database server. This allows you to spread out in a number of server processing power to meet the ever-expanding growth.
However, the additional features and functions that require higher levels of complexity. An expansion of the database difficult to design or management. After you have successfully implemented a database system before expanding outward, you have to solve many difficult business and technical problems.
This article describes the expansion of the database system of the two options, in order to achieve higher scalability: horizontal data partitioning and vertical data partitioning.
Level of data partitioning
Using the standard data partitioning, database structure has not changed in the database instance context. Typically, the only difference between the database instance contains data that is different.
Develop middle-tier application that allows the data between the instances are properly maintained are the characteristics of this solution. May be difficult to decide how to divide the data between the database instance. Data distribution method is very critical because we need to compare different server load evenly distributed data. No such equal division, you Jiu not get any benefit from the expansion of the database's, because the query or transaction processing of Dabu Fen IO still only occurring on one Fuwuqishang.
Since all data is no longer stored in a server, so if necessary, more difficult to perform queries on all data. Fortunately, you can create a distributed partition view to connect the data between two server instances, making the data look like stored in a server. There are special views that they use to connect the server and set up in the data table bound to return the data effectively, as if you only query the data on a server the same. (I will discuss in detail next week's article distributed partition view.)
In addition, it is worth mentioning that, if the server is in a different location, their performance may be affected. In this case, you may want to replicate data between the instances so that each server has a complete data, but is only responsible for maintaining a specific piece of data.
Vertical data partitioning
Vertical data partitioning, including the database table is separated into different servers stored in different database instances. General distribution of each server to complete a specific task. This allows those in the IO table to segment. This type of division depends on the system logically divided into many parts, so that these components can operate independently. If the instance of the minimum amount of interaction between the need to conduct transactions, such treatment would be necessary.
For example, if your database system to maintain sales, marketing and advertising data, it is best to split these tables into a single database instance, prevent them from sharing the same server IO. You may also need to address these two share some of the same data (such as customer data) system. To separate these business functions, you can, where necessary, the expansion of the database environment, improve system efficiency.
You can take some measures, such as the use of each server connected to each other tables and views, so that instances can view the data from the other instance. This will reduce application layer to decide which data it needs to find the necessary additional computation. You need to ensure that the necessary application logic layer to determine where the data stored in the server.
Modify
You can be the horizontal and vertical data partitioning method is modified to better suit your environment. For example, you can use a service-oriented architecture allocation of processing capacity between the server; application of replication to ensure that the database instance in close synchronization with each other; and combined application of these techniques.