Read-write method and system for database

A reading and writing method and database technology, applied in the field of database reading and writing methods and systems, can solve problems such as low database writing performance and low reading performance, and achieve optimized writing performance, optimized reading performance, and fast reading. Effect

Inactive Publication Date: 2013-03-27
SHANGHAI SHENGPAY E PAYMENT SERVICE CO LTD
View PDF5 Cites 31 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] In view of this, the present invention provides a database reading and writing method and system to overcome the problem of low database writing performance or low reading performance caused by the use of a single storage method in the prior art

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
  • Read-write method and system for database
  • Read-write method and system for database
  • Read-write method and system for database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0080] figure 1 It is a schematic diagram of the structure of each node in the actual application of the embodiment of the present invention, wherein one metadata node includes n write replica nodes, and one write replica node corresponds to m read replica nodes, where n and m are both is a natural number. For example, for the write replica node 1, the corresponding m read replica nodes are: read replica node 1-1, read replica node 1-2... read replica node 1- m. In practical application, figure 1 The metadata node in the database first horizontally divides the record data in the database into multiple data segments, and then saves each data segment in a write copy node, and these write copy nodes store the data in the form of rows Storage, which is convenient for users to quickly write to the database. According to the characteristics of the data, the metadata node allocates multiple read replica nodes for the data segment in the write replica node under each write replica...

Embodiment 2

[0104] figure 1 It is a schematic diagram of the structure of each node in the actual application of the embodiment of the present invention, wherein the application functions and characteristics of each node can refer to the first embodiment about figure 1 description of.

[0105] see Figure 4 as shown, Figure 4 It is a flow chart of an embodiment realizing the data reading method of the present invention, and the specific steps can be as follows:

[0106] Step 401: Accept an access request initiated by a client, where the access request is a data read operation.

[0107] In this step, the metadata node accepts the data reading operation initiated by the client.

[0108] Step 402: Determine whether there is a primary key in the access request, if yes, execute step 403; if not, execute step 404.

[0109] In this step, the metadata node judges whether the access request contains the primary key.

[0110] Step 403: According to the global index stored in the metadata nod...

Embodiment 3

[0162] A database read-write system, see figure 1 , figure 1 It is a schematic structural diagram of the system disclosed in the embodiment of the present invention. The metadata node divides the record data horizontally into multiple data segments according to the primary key. Each data segment is saved as a write copy and multiple corresponding read copies. The write copy is stored in the form of row storage. The read copy is stored in the form of column storage, and the data in each read copy is organized in different ways. The system can include:

[0163] The metadata node is used to judge the request for the access initiated by the client. When the access request is a data writing operation:

[0164] Determine the data interval where the data to be written is located and the write replica node corresponding to the data interval according to the global index saved by itself and the primary key in the access request;

[0165] Initiate an operation request to the write re...

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 discloses a read-write method and system for a database. The method comprises the steps of: transversely cutting record data according to a main keyword into a plurality of data segments, wherein each data segment is stored as a write copy and corresponding read copies, and the write copy is stored in form of line storage, so that the write performance of the database is optimized; the read copies are stored in form of column storage, and data in each read copy is organized in different manners, so that the read performance of the database is optimized. According to the method, an overall index and a local index are further established, so that the operating position of data to be written or to be read can be quickly positioned when data is written or read. According to the embodiment of the method or system, not only is data quickly written, but also data can be quickly read.

Description

technical field [0001] The invention relates to the field of computer data processing, in particular to a method and system for reading and writing a database. Background technique [0002] With the development of society and technology, computers have been widely used in daily life and work. Nowadays, due to the needs of daily life and work, users need to store and process a lot of data through computers, and the database system is an application system that can realize the above content. It is an ideal system developed to meet the needs of data processing. Central body for data processing. In real daily life and work, users require convenient access operations such as data storage and data query to the database. [0003] Distributed database system is a kind of database system, which is developed on the basis of centralized database system. It is the product of the combination of computer technology and network technology, including client, metadata node and data storage...

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
Inventor 邓明潘佳伟邢钦华
Owner SHANGHAI SHENGPAY E PAYMENT SERVICE CO LTD
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