Method for realizing separation of reading and writing of database and device

A read-write separation and database technology, applied in the field of data processing, can solve problems such as increasing the difficulty of application development

Active Publication Date: 2017-06-20
BEIJING FEINNO COMM TECH
View PDF5 Cites 11 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The above method is to realize the separation of reading and writing t

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
  • Method for realizing separation of reading and writing of database and device
  • Method for realizing separation of reading and writing of database and device
  • Method for realizing separation of reading and writing of database and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0062] In order to make the object, technical solution and advantages of the present invention clearer, the implementation manner of the present invention will be further described in detail below in conjunction with the accompanying drawings.

[0063] see Picture 1-1 , the embodiment of the present invention provides an application scenario diagram for realizing separation of reading and writing of a database, including an application server, a proxy server, a master database (Master) and a slave database (Slave1 and Slave2) of the database. Proxy servers include proxy database servers (DBproxy) and management servers.

[0064] The management server is used to configure the read-write separation table. The read-write separation table includes the request identifier of the SQL access request requiring read-write separation, and synchronizes the read-write separation table to the proxy database server.

[0065] The management server is also used to add or delete SQL access req...

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 invention discloses a method for realizing separation of reading and writing of a database and a device, and belongs to the technical field of data processing. The database comprises a main base and a secondary base; the secondary base is the backup of the main base; the method includes steps of receiving a structured query language SQL access request sent by an application server; according to the SQL access request, acquiring an operation type corresponding to the SQL access request and request logo of the SQL access request; if the operation type is a writing operation type, writing a to-be-written data corresponding to the SQL access request to the main base; if the operation type is a reading operation type, confirming if the separation of reading and writing is required according to the request logo and the reading-writing separation table; if the reading-writing separation is required, reading data corresponding to the SQL access request from the secondary base, wherein the reading-writing separation table comprises a request logo of SQL access request in need of separation of reading and writing. The device comprises a receiving module, a first acquiring module, a writing module and a reading module. The method and the device can reduce the development difficulty of the application procedure.

Description

technical field [0001] The invention relates to the technical field of data processing, in particular to a method and a device for realizing separation of reading and writing of a database. Background technique [0002] In Internet database solutions, MySQL (relational database) is a commonly used database. In the case of high concurrent data access, MySQL generally uses read-write separation technology to realize data read and write operations. Read-write separation refers to setting up a master library and at least one slave library in the database. The data in the master library is synchronized to the slave library in real time. The master library is responsible for writing operations, and the slave library is responsible for reading operations. [0003] Wherein, the connection string corresponding to the master library is used to uniquely identify the master library, and the connection string corresponding to each slave library is used to uniquely identify the slave libr...

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
IPC IPC(8): G06F17/30
CPCG06F16/217G06F16/27
Inventor 吴炳锡
Owner BEIJING FEINNO COMM TECH
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