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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
![No PUM](https://static-eureka.patsnap.com/ssr/23.2.0/_nuxt/noPUMSmall.5c5f49c7.png)
Abstract
Description
Claims
Application Information
![application no application](https://static-eureka.patsnap.com/ssr/23.2.0/_nuxt/application.06fe782c.png)
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com