Supercharge Your Innovation With Domain-Expert AI Agents!

Method and device for generating B tree index of database

A database and indexing technology, applied in the field of database processing, can solve problems such as high hardware requirements and large memory usage, and achieve the effect of less memory usage and low hardware requirements

Inactive Publication Date: 2012-10-17
BEIJING WATCH DATA SYST
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] In order to solve the problem that the existing B-tree index algorithm needs to occupy a large amount of memory and has high requirements on hardware, the embodiment of the present invention provides a method for generating a B-tree index of a database, including:

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 generating B tree index of database
  • Method and device for generating B tree index of database
  • Method and device for generating B tree index of database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0036] In order to solve the problem of low security of user identity verification, the first embodiment provided by the present invention is a method for generating a B-tree index of a database, and the method flow is as follows figure 2 shown, including:

[0037] Step 101: Search for the node 10 of the record to be inserted or deleted in the B-tree.

[0038] Step 102: Judgment is made before inserting or deleting a record on the node 10, and if the space of the node 10 is sufficient, the inserting operation ends. Otherwise, go to step 103. If after the record is deleted, the space of node 10 is greater than or equal to half, the execution of the delete operation ends. Otherwise, go to step 103.

[0039] Step 103: Find the parent node to obtain all the records of the node 10 and its left sibling node 11 and right sibling node 12, three nodes.

[0040] Step 104: Allocate a section of memory space apOld, load node 10 and its left brother node 11 and right brother node 12, ...

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 generating a B tree index of a database for solving the problems that the conventional B tree index algorithm needs to take a great deal of memory and has higher requirement on the hardware. The method for generating the B tree index of the database comprises the following steps: determining that imbalance of the index tree can be caused before performing inserting or deleting record operation on a node of the index tree, acquiring all records in nodes to be updated; acquiring records to be reallocated by the acquired records according to the inserted and deleted records; computing the sum of the records to be reallocated; and simultaneously, re-computing the number of new nodes needed by generating a new balanced index tree and the numberof the records contained in each new node according to the size of the records contained in a single node, allocating the records to be reallocated into new nodes and generating the new balanced index tree. By re-computing the sum of the sizes of the records to be reallocated and the size of the records contained in the single node and reallocating the records, the inserting or deleting operationis unnecessarily distinguished, and the used memory is less and the hardware requirement is low.

Description

technical field [0001] The invention belongs to the technical field of database processing, and in particular relates to a method and device for generating a B-tree index of a database. Background technique [0002] With the development of smart card technology, the amount of data stored in the card is increasing. The traditional file system needs to traverse the entire file to find specific data, which is inefficient. In order to overcome this defect and achieve the purpose of quickly finding data, we have introduced a database indexing technology in the smart card, that is, B-tree indexing technology. [0003] B-tree index refers to organizing the index into a B-tree data structure to achieve the purpose of efficient index execution. B-tree is a multi-way balanced search tree. An M-order B-tree must satisfy the following properties: A node has at most M subtrees; if the root node is not a leaf node, it has at least two subtrees; all non-terminal nodes except the root have...

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 BEIJING WATCH DATA SYST
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More