B+ tree indexing method and device of real-time database

A B+ tree and database technology, applied in the field of data processing, can solve problems such as poor practicability and low efficiency of index structure, and achieve the effects of improving stability, quick access, and improving performance

Inactive Publication Date: 2012-04-04
AEROSPACE SCI & IND SHENZHEN GROUP
View PDF2 Cites 27 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0010] The purpose of the embodiments of the present invention is to provide a B+ tree indexing method and device for a real-time d

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
  • B+ tree indexing method and device of real-time database
  • B+ tree indexing method and device of real-time database
  • B+ tree indexing method and device of real-time database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0040] Such as figure 1 Shown is a flow chart of the B+ tree indexing method for the real-time database provided by the present invention. For ease of description, only the parts related to the embodiment of the present invention are shown.

[0041] In step S101, the number of nodes is obtained according to the number of tables or records in the real-time database, and the nodes include a node domain and a control domain.

[0042] In the embodiment of the present invention, the index may be an index of a table in the real-time database, or an index of each record in the real-time database. In a B+ tree, a node is used to represent a table or a record in a database, so the number of tables or records is the same as the number of nodes. If creating an index of a table, the number of nodes is obtained according to the number of tables; if creating an index of records, the number of nodes is obtained according to the number of records.

[0043] In this embodiment of the present ...

Embodiment 2

[0051] Embodiment 2 is a method for querying keywords based on the B+ tree index created in Embodiment 1 provided by the present invention. For the convenience of description, only the parts related to the embodiment of the present invention are shown.

[0052] In the embodiment of the present invention, the key of the table or record to be searched is compared layer by layer with all keys of each node in the B+ tree until the table or record corresponding to the desired search is found in the leaf node The same keyword as the keyword.

[0053] A specific example is given below to describe in detail.

[0054] If the established B+ tree is as follows figure 2 As shown in , the keywords of tables or records are represented by English letters, and the leaf nodes are linked in the order of the value of the keywords. Need to find the keyword G in this B+ tree. The specific search method is as follows:

[0055] First, compare the keyword G with the keyword P in the root node, a...

Embodiment 3

[0058] Embodiment 3 is a method for inserting a keyword according to the B+ tree index created in Embodiment 1 provided by the present invention. For the convenience of description, only the parts related to the embodiment of the present invention are shown.

[0059] In the embodiment of the present invention, since the leaf nodes are linked in order of the value of the key, the key to be inserted is inserted into the corresponding leaf node according to the value of the key. Among them, there are two points to note:

[0060] First, if the leaf node corresponding to the keyword to be inserted is added with the keyword to be inserted, and the number of keywords it contains is less than or equal to the order of the leaf node, then the keyword is directly inserted into the corresponding leaf node middle.

[0061] Second, if the number of keywords contained in the leaf node corresponding to the keyword to be inserted is greater than the order of the leaf node after adding the key...

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 is suitable for the data processing field, providing a B+ tree indexing method and device of real-time database, wherein the method includes the steps of: obtaining the number of the nodes according to the table or the recorded number in the real-time database, wherein the node includes a node domain and a control domain; dividing a corresponding memory space for storing the node domain and the control domain of each node according to the memory space for each node; storing the table or the recorded keyword to the node domain of the node, storing the pointer information to the control domain of the node and generating each node and B+ tree index. The invention provides an effective and stable indexing method, which increases the stability of the real-time database and the performance of the real-time database so that the user can rapidly visit the real-time database.

Description

technical field [0001] The invention belongs to the field of data processing, and in particular relates to a B+ tree indexing method and device for a real-time database. Background technique [0002] With the continuous expansion of the amount of data today, the data in the database continues to increase, and the application requires the database to have characteristics such as initiative, real-time, and timeliness. Among them, the index is an effective tool to improve the execution efficiency of the database system. Because real-time database indexes are affected by fast memory access and high effective utilization, the index structures suitable for real-time databases can be roughly divided into two categories: one is the index structure in which the data maintains a certain natural order, such as each One data structure; the other is an index structure in which data is randomly distributed, such as various hash structures. [0003] Traditional index structures mainly in...

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
Inventor 丁明伟
Owner AEROSPACE SCI & IND SHENZHEN GROUP
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