Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

System and method for synchronizing master-slave databases

A master database and synchronization system technology, applied in database distribution/replication, electronic digital data processing, structured data retrieval, etc., can solve problems such as database asynchrony, and achieve the effect of improving access efficiency, reducing access, and reducing pressure

Inactive Publication Date: 2016-05-25
RETURNSTAR INTERACTIVE TECH GRP
View PDF3 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] One of the technical problems to be solved by the present invention is to provide a master-slave database synchronization system to solve the problem of out-of-sync databases, realize real-time reading of the latest data, and improve access efficiency

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
  • System and method for synchronizing master-slave databases
  • System and method for synchronizing master-slave databases

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0031] Such as figure 1 As shown, a master-slave database synchronization system includes a cache creation module, an interceptor module, a configuration module and a database access module;

[0032] The cache creation module is used to obtain frequently used data tables in the main database and write them into the cache linked list;

[0033] The interceptor module is used to create an interceptor, through which the identification and judgment of the database source to be accessed is realized before implementing the business logic service method, and the service method includes a method of adding, deleting, modifying and querying; The interceptor module is specifically: used to create an interceptor, define a thread local variable, the notification type of the interceptor is a pre-notification, the thread local variable is used to store the name of the data source, and the thread local The default value of the variable is the data source of the main database. When implementin...

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 provides a system and method for synchronizing master-slave databases. The system comprises a cache creating module, an interceptor module and a database access module. The method comprises the steps: acquiring data sheets frequently used in a master database, and writing the data sheets in a cache chain table; creating an interceptor which is used for achieving identification and judgment on a database source to be accessed before achieving a business logic service method, wherein the service method comprises an adding, deleting and revising method and a querying method; if the service method carries out adding, deleting and revising operations, writing data in the cache chain table while writing the data in the master database, and synchronizing the data of the master database to a slave database; if the service method carries out a querying operation, judging whether data required exist in the cache chain table or not, reading the data directly from the cache chain table if the data required exist in the cache chain table, or reading the data from the slave database if the data required do not exist in the cache chain table. According to the system and the method, the problem that the databases are out of sync is solved, latest data are read in real time, and meanwhile, the access efficiency is increased.

Description

technical field [0001] The invention relates to the field of database synchronization, in particular to a master-slave database synchronization system and method. Background technique [0002] In recent years, with the rapid development of the Internet, the scale of website applications has continued to expand, the volume of business has also continued to increase, and the performance requirements for application systems have also become higher and higher. In particular, the performance of the database has an increasing impact on system performance. In order to reduce the pressure on the database, the technology of master-slave database separation will be used in the project. Among them, the master data is used to write data when adding, deleting and modifying data, and the slave database It is used for data query, but it takes a certain amount of time for the data to be synchronized from the master database to the slave database. When the user is operating, the data will be...

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/27
Inventor 丁万年洪文洁陈日良谢伟杰
Owner RETURNSTAR INTERACTIVE TECH GRP
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products