Database read-write separating method and device

A read-write separation, database technology, applied in the direction of electrical digital data processing, special data processing applications, instruments, etc., can solve problems such as error-prone business codes, and achieve the effect of read-write separation

Active Publication Date: 2014-06-11
BEIJING FEINNO COMM TECH
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] As for how to quickly and effectively access the Master library or the Slave library according to different businesses, the basic solution in the traditional solution is to hard-code it into the program, and rely on the programmer's thinking to distinguish between read operations and write operations. This method produces a large number of Repeated codes lead to very high coupling between business logic and read and write operations, and the more business codes, the more error-prone

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 read-write separating method and device
  • Database read-write separating method and device
  • Database read-write separating method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0023] figure 2 It is a flow chart of a method for separating read and write from a database in the present invention. Such as figure 2 Shown:

[0024] Step 201, define the naming method of the business method for accessing and writing the database, and name the business method according to the defined naming method;

[0025] Step 202, when there is a business method that needs to access the database, according to the method name of the business method and the naming method of the definition, determine whether the business method is a method for accessing the write database, and if so, locate the business method to the write database, Otherwise locate the business method to read the database.

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

[0027] image 3 It is a structural schematic d...

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 database read-write separating method and a database read-write separating device. The method comprises the following steps of: defining and accessing a naming mode of a service method of a write database, and naming the service method according to the defined naming mode; judging whether the service method is a method for accessing the write database according to the name of the service method and the defined naming mode when the database is required to be accessed through the service method; positioning to the write database if the service method is the method for accessing the write database, otherwise, positioning the service method to a read database. By the method, the database read-write is separated by judging the name of the service method.

Description

technical field [0001] The invention relates to the field of database access, in particular to a method and device for separating reading and writing of a database. Background technique [0002] With the development of the Internet, the application of large databases has become an indispensable part of web applications. Usually, we use a database for read and write operations. This technical solution will make database access a bottleneck in large concurrent access, so Database reading and writing separation technology emerged as the times require, which separates database reading and writing, which can effectively solve the pressure in the case of large database concurrency. figure 1 It is a schematic diagram of database reading and writing separation in the prior art. [0003] Such as figure 1 As shown, a read-write library (Master) and multiple read-write libraries (Slave) are usually set up in a group of databases. Access the Slave library when performing read operati...

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 Patents(China)
IPC IPC(8): G06F17/30
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