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

Database access method and device

An access method and database technology, applied in the field of database access methods and devices, can solve the problems of dependency, low reliability of continuous access of applications, and increase the overall complexity, so as to reduce the complexity, improve the real-time processing, and avoid network waiting. Effect

Pending Publication Date: 2021-01-15
北京人大金仓信息技术股份有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The other is through the middleware proxy method, which needs to add a layer of proxy layer and depends on the support of the middleware for specific databases, which is not good for some domestic database manufacturers.
At the same time, the introduction of the intermediate proxy layer also needs to consider the high availability solution of the intermediate proxy node itself, which increases the overall complexity
[0004] Therefore, the existing access database solutions need to rely on high-availability processing of applications, or rely on middleware support for specific databases. The coupling and solution complexity are high, resulting in low reliability of continuous access to applications, which cannot be well implemented. Access to highly available databases

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 access method and device
  • Database access method and device
  • Database access method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0026] refer to figure 1 As shown in the flow chart of the database access method, the method may include the following steps:

[0027] S102. Obtain an access request; wherein, the access request is an access request in a SQL statement format.

[0028] S104. Determine an initial server that responds to the access request according to the operation type of the access request.

[0029] Operation types include read operation types and write operation types. In this embodiment, when the operation type of the access request is a write operation type, the server responding to the access request is a host server in the database cluster, where it can be determined that the initial server is the first host server; when the operation type of the access request is For the read operation type, the server responding to the access request is the standby server in the database cluster, and here it can be determined that the initial server is the first standby server.

[0030] S106, judgin...

Embodiment 2

[0085] Based on the first embodiment above, this embodiment provides a database access device, refer to Figure 4 , the device consists of:

[0086] A request obtaining module 402, configured to obtain an access request;

[0087] The server determination module 404 is configured to determine the initial server responding to the access request according to the operation type of the access request;

[0088] The state detection module 406 is used to judge the online state of the initial server according to the detection operation; wherein, the detection operation is an operation of detecting the online state of each server in the database cluster according to a preset time interval;

[0089] A request sending module 408, configured to send the access request to the initial server for execution if the initial server is online.

[0090] The database access device provided by the embodiments of the present disclosure does not need to rely on the application side or the proxy layer...

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 database access method and device, and relates to the technical field of databases. The method comprises steps of acquiring an access request; determining an initial server responding to the access request according to the operation type of the access request; judging the online state of the initial server according to the detection operation, wherein the detection operation is an operation of detecting the online state of each server in the database cluster according to a preset time interval; and if the initial server is online, sending the access request to the initial server for execution. According to the method and the device, the processing real-time performance of the online state of the server can be improved, network waiting caused by connection failure is avoided, and the complexity of database access can also be reduced.

Description

technical field [0001] The present disclosure relates to the technical field of databases, in particular to a database access method and device. Background technique [0002] As a high-availability architecture, database clusters have been increasingly applied to Internet services. The high-availability solution means that when the application accesses the database through JDBC (Java Database Connectivity, Java Database Connection), all external connections to the database will not be invalid due to changes in the internal nodes of the database cluster or switching between active and standby nodes, which will affect the application. Continuous access to the database; instead, it can automatically detect the cluster status and continue to access the database without rebuilding the JDBC connection. [0003] At present, there are two main technologies for accessing databases with high availability: one is to capture and process exceptions driven by JDBC through the application...

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): G06F16/25G06F16/245G06F11/30
CPCG06F16/252G06F16/24569G06F11/3006G06F11/3055G06F2201/80
Inventor 李楠韩慧敏冯玉
Owner 北京人大金仓信息技术股份有限公司
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