Method and device for accessing database

A database and data technology, applied in the database field, can solve problems such as unreadable data, consume CPU resources or memory resources, increase the difficulty of database maintenance, etc., and achieve the effect of improving convenience and saving physical resources

Active Publication Date: 2014-04-09
ADVANCED NEW TECH CO LTD
View PDF5 Cites 43 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

After the sub-database and table-splitting rules are modified, all the data with the penultimate digits of the user IDs in the original A and B databases with 6, 7, 8, and 9 must be migrated to the C database, otherwise the new ...

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 and device for accessing database
  • Method and device for accessing database
  • Method and device for accessing database

Examples

Experimental program
Comparison scheme
Effect test

example 1

[0109] Example 1: The sub-database sub-table rule is the penultimate digit of the user ID, 1, 3, 5, 7, and 9 enter the A library; 0, 2, 4, 6, and 8 enter the B library; when adding a new C library to manage For data, in the prior art, it is necessary to change the sub-database and sub-table rules to 1, 3, and 5 into the A database, 0, 2, and 4 into the B database, and 6, 7, 8, and 9 into the C database. After the sub-database and table-splitting rules are modified, all the data with the penultimate digits of the user IDs in the original A and B databases with 6, 7, 8, and 9 must be migrated to the C database, otherwise the new sub-database and table rules will be used It will cause some data in the old database to be unreadable; and the data migration undoubtedly increases the difficulty of database maintenance and consumes a large amount of CPU resources or memory resources.

[0110] Since in the embodiment of the present application, both the write data and the read data are...

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 method and a device for accessing a database. The method specifically includes: presetting a sharding identification generating rule; receiving a database write access request which carries to-be-written data; according the database write access request, dynamically acquiring a currently available database and database list information in the database, and acquiring a corresponding library index and a corresponding list index; according to the sharding identification generating rule, splicing the library index and the list index together with static positions to acquire a sharding identification corresponding to the database write access request; according to the sharding identification generating rule, routing the library index and the list index in the sharding identification corresponding to the database write access request; writing the to-be-written data into a data list in a database corresponding to a routing result. By the method and the device, convenience in database maintenance can be improved, and physical resources of a database system can be saved.

Description

technical field [0001] The present application relates to the field of database technology, in particular to a method and device for accessing a database. Background technique [0002] At present, with the development of society, a large amount of data in the application system needs to be stored, and a certain data access method is used to process the stored data according to the needs of different users. The database is a technology that meets this demand, and it is simple To put it bluntly, a database is a collection of data stored in a way that can be persisted and manipulated. [0003] When the amount of data to be stored reaches a certain level (for example: hundreds of millions of levels), using a single database for data storage management will cause problems such as capacity bottlenecks and performance bottlenecks, which will affect the improvement of application system processing capabilities, thereby affecting faster business. At the same time, a single database ...

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/211G06F16/27
Inventor 曹刚周兴江王文治
Owner ADVANCED NEW TECH 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