Database insertion sorting method

An insertion sorting and database technology, applied in the field of database sorting, can solve the problems of cumbersome insertion sorting operations, and achieve the effect of reducing operation steps and improving performance

Inactive Publication Date: 2019-01-18
WUHAN DAMENG DATABASE
View PDF3 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The purpose of the present invention is to overcome the above-mentioned technical deficiencies, provide a database insertion sorting method, and solve the technical problem of cumbersome insertion sorting operations 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
  • Database insertion sorting method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0013] Such as figure 1 As shown, embodiment 1 of the present invention provides a kind of database insertion sorting method, comprises the following steps:

[0014] Step S1, update the sorting number of the sorting field according to the size of the sorting number to be a continuous sequence number starting from 1;

[0015] Step S2, expanding all the sequence numbers by N times, where N is an integer greater than or equal to 2;

[0016] Step S3, obtain the sequence number of the data to be inserted and the reference data according to the unique key values ​​of the data to be inserted and the reference data, and if it is necessary to move the data to be inserted forward, modify the sequence number of the data to be inserted to the Subtract M from the sequence number of the reference data; if the data to be inserted needs to be moved backward, modify the sequence number of the data to be inserted to the sequence number of the reference data plus M; M is an integer greater than...

Embodiment 2

[0039] Embodiment 2 of the present invention provides a computer storage medium on which a computer program is stored. When the computer storage medium is executed by a processor, the database insertion sorting method described in any of the above embodiments is implemented.

[0040] The computer storage medium provided by the present invention is used to implement the above-mentioned database insertion sorting method. Therefore, the technical effects of the above-mentioned database insertion sorting method are also provided by the computer storage medium, and will not be repeated here.

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 insertion sorting method, comprising the following steps: step S1, updating the sorting number of the sorting field according to the size of the sorting number to bea continuous serial number starting from 1; Step S2, enlarging all the sequence numbers by N times, wherein N is an integer greater than or equal to 2; step 3, obtaining that sequence numbers of thedata to be insert and the reference data according to the unique key values of the data to be inserted and the reference data, and if the data to be insert is to be moved forward, modifying the sequence numbers of the data to be inserted into the sequence numbers of the reference data minus M; If it is necessary to move the data to be inserted backward, modifying the sequence number of the data tobe inserted into the sequence number of the reference data plus M, M being an integer greater than 0 and less than N; Step S4, according to the size of the sort number, updating the sorting number ofthe sorting field to be a continuous sequence number starting from 1. The invention only needs to know the unique key value of the data to be inserted and the reference data, and the moving directionto complete the data insertion sorting.

Description

technical field [0001] The invention relates to the technical field of database sorting, in particular to a database insertion sorting method. Background technique [0002] In the database, some data tables are designed with sorting fields to identify the relative position of the data. These data need to provide data insertion and sorting operations in the business system to change the relative position of the data. For example, when it is necessary to insert the data to be moved behind a certain reference data, it is necessary to move the data whose sequence number is greater than or equal to the sequence number of the reference data one by one, and then insert the data into the position of the reference data. In this process, there are more operation steps to move the data one by one, and the number of steps is equal to the amount of data to be moved. In the whole process, there are many operations to modify data, and frequent data modification operations have a great im...

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/22G06F16/23
Inventor 黄洪冰张永强陶天林
Owner WUHAN DAMENG DATABASE
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