Database operation separation method and database operation separation system

A separation method and database technology, applied in the information field, can solve problems such as data inconsistency, performance loss, and increase complexity, so as to reduce concurrency pressure, improve performance, and reduce complexity.

Inactive Publication Date: 2015-03-04
SHANGHAI DAMENG DATABASE
View PDF4 Cites 23 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The above-mentioned database read-write separation technology has the following defects: due to the need to deploy an application server or proxy layer on the upper layer of the database, it increases the complexity and causes corresponding performance loss. In addition, there is also the problem of data inconsistency between the master database and the slave database

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Database operation separation method and database operation separation system
  • Database operation separation method and database operation separation system
  • Database operation separation method and database operation separation system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0025] see figure 1 , is a flow chart of a database operation separation method provided in Embodiment 1 of the present invention. The method in the embodiment of the present invention is applicable to a database operation separation system, and the system includes a client, a master database, and a candidate slave database connected to the master database.

[0026] The method includes:

[0027] Step 110, the client establishes a first connection with the master database, and establishes a second connection with the target slave database;

[0028] Wherein, the target slave database is determined from candidate slave databases connected to the master database by the master database according to the operation separation connection request sent by the client.

[0029] Step 120, the client determines the operation type corresponding to the operation request included in the operation transaction according to the input operation transaction;

[0030] This step is specifically to ...

Embodiment 2

[0041] see figure 2 , is a flowchart of a database operation separation method provided in Embodiment 2 of the present invention. On the basis of the above-mentioned embodiments, this embodiment provides that the client assigns the master database or the candidate slave database connected to the master database based on the preset operation request allocation strategy according to the operation type corresponding to the current operation request. A preferred solution for a target to execute the current operation request from the database.

[0042] In this embodiment, the operation type may include: read operation, write operation, commit operation and rollback operation.

[0043] This preferred method includes:

[0044] Step 210, if the operation type corresponding to the current operation request is a read operation, and in the operation transaction, the operation types corresponding to the operation requests before the current operation request are all read operations, then...

Embodiment 3

[0062] see image 3 , is a flowchart of a database operation separation method provided in Embodiment 3 of the present invention. On the basis of the foregoing embodiments, this embodiment provides an optimal solution in which the master database synchronizes the operation data in the master database to the candidate slave database based on a preset data consistency policy.

[0063] This preferred method includes:

[0064] Step 310, if the master database obtains the commit operation sent by the client, the master database sends the log contained in the log buffer of the master data to the candidate slave database, so that the candidate slave The database redoes accordingly according to the log;

[0065] In this step, after receiving the commit operation sent by the client, the master database sends the log contained in the log buffer of the master data to the candidate slave database, so that the candidate slave database Redo accordingly so that the master database is cons...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The embodiment of the invention provides a database operation separation method and a database operation separation system. The method comprises the following steps that a client establishes a first connection with a main database and establishes a second connection with a target slave database; the client determines operation types corresponding to operation requests contained in operation affairs according to input operation affairs; as for each operation request contained in the operation affairs, the main database or the target slave database is allocated to execute the current operation request based on a preset operation request allocation strategy according to the operation type corresponding to the current operation request; the main database synchronizes the operational data in the main database to a candidate slave database connected with the main database based on a preset data consistency strategy. According to the scheme, the complexity of a database system composed of the main database and the candidate slave database can be reduced, the concurrence pressure of the main database is reduced, and the performances of the database system are improved; the data consistency between the main database and the candidate slave database can also be ensured.

Description

technical field [0001] The embodiments of the present invention relate to the field of information technology, and in particular, to a database operation separation method and system. Background technique [0002] With the development of the information age, the speed of information update is accelerating, the types of information are becoming more and more complex, and the scale of business data is increasing. How to meet the high concurrent reading and writing of data in the database system is a huge challenge. Traditional database systems use one database for read and write operations. When the amount of concurrency is high, the concurrency performance of the database may become the bottleneck of the entire application system. In order to solve this problem, a database system with read-write separation came into being. The read-write separation database system generally includes a master database and several slave databases. Write operations are performed on the master d...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30
CPCG06F16/2365
Inventor 郭振岗王海龙沈宁赵侃
Owner SHANGHAI DAMENG DATABASE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products