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

Method and device for storing data in database

A technology for storing data and storage devices, applied in the field of databases, can solve problems such as increased burden on storage devices, data loss, complex data migration, etc., and achieve the effect of smooth expansion and small burden on storage devices

Active Publication Date: 2013-08-07
ALIBABA GRP HLDG LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] This application provides a method for storing data in a database, so as to solve the problems of heavy burden on storage devices, complex data migration, and easy data loss during the expansion process of the existing database
[0009] The present application also provides a storage device to solve the problems of heavy burden on storage devices, complex data migration, and easy data loss during the expansion process of the existing database

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 storing data in database
  • Method and device for storing data in database
  • Method and device for storing data in database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0034] Embodiment 1 of the present application provides a method for storing data in a database, such as figure 1 shown, including:

[0035] Step 101, performing the first modulo processing on the first preset value of the identification information of the data to be stored;

[0036] Step 102, performing the first quotient processing according to the value obtained in the first modulo processing;

[0037] Step 103, storing the data to be stored in multiple databases according to the first quotient value obtained by the first quotient seeking process, and the first preset value is greater than the number of the databases.

[0038] Preferably, the first divisor of the first quotient seeking process is the number of the database.

[0039] Preferably, the first preset value is an integer multiple of the number of the databases.

[0040] Preferably, storing the data to be stored in multiple databases according to the first quotient value obtained by the first quotient seeking pr...

Embodiment 2

[0061] Such as Figure 5 As shown, the second embodiment of the present application is based on the first embodiment, and performs a segmentation operation on any one of the multiple databases in the first embodiment, that is, the Any database is divided into multiple sub-databases, specifically including the following steps:

[0062] Step 104 , performing a second modulo processing on the second preset value of the identification information of the data stored in the divided database; the second preset value may be the same as or different from the first preset value.

[0063] Step 105, according to the value obtained in the second modulo-taking process, store the data stored by the divided database in multiple sub-databases.

[0064] In order to more clearly illustrate the method for storing data in the database in the second embodiment, a further detailed introduction will be made below in combination with specific implementation scenarios, wherein the device performing da...

Embodiment 3

[0070] Embodiment 3 of the present application is also based on Embodiment 1, and performs a segmentation operation on any one of the multiple databases in Embodiment 1, that is, any one of the multiple databases The database is divided into multiple sub-databases, such as Figure 6 As shown, it specifically includes the following steps:

[0071] Step 106, performing a third modulo processing on the third preset value of the identification information of the data stored in the divided database;

[0072] Step 107, performing a second quotient process on the result of the third modulo-taking process;

[0073] Step 108, according to the second quotient obtained by the second quotient processing, store the data stored in the divided databases in multiple sub-databases.

[0074] In the third embodiment, since the first preset value in the first modulus processing in the first embodiment is greater than the number of databases, when any database in the first embodiment is divided ...

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 method and a device for storing data in a database. In the invention, the method provided by the invention comprises the following steps of: carrying out an impression-taking treatment on a pre-set value by identification information of data to be stored and carrying out a quotient treatment on the value obtained by the impression-taking treatment; then storing the data into different databases according to the result of the quotient treatment; because the number of the database is less than the pre-set value, selecting a greater pre-set value through the way when the storing device carries out the quotient treatment; then selecting a smaller value according to the number of the database and carrying out the quotient treatment on the impression-taking result; storing the data into multiple databases according to the value of the quotient treatment. The storing method provided by the invention only needs to carry out the impression-taking step and the like on the database to be segmented and stores the data according to the calculated value so that other databases are not influenced and possible rehash operations are avoided; the load of the storing deviceis small, the data migration is simple and the data is not easy to be lost in the migration process, and a smooth expansion of the database is effectively realized.

Description

technical field [0001] The invention relates to the field of databases, in particular to a method and device for storing data in a database. Background technique [0002] A database is a warehouse that organizes, stores and manages data according to the data structure. The database was born fifty years ago. With the development of information technology and the market, data management is no longer just storing and managing data, but has transformed into various data management methods required by users. There are many types of databases, ranging from the simplest tables storing various data to large database systems capable of storing massive amounts of data, which have been widely used in various aspects. [0003] In the Internet industry, enterprises are faced with huge data and massive data access, so the role of databases in Internet enterprises is becoming more and more important. The traditional database system manages data based on a single database, but with the ra...

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 ALIBABA GRP HLDG LTD
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