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

A database access method for tree structure data

A tree structure, database technology, applied in the direction of electrical digital data processing, special data processing applications, instruments, etc., can solve a lot of time problems, to achieve the effect of increasing and overcoming CPU time

Active Publication Date: 2018-07-31
ZHEJIANG UNIV
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The nested collection model can quickly query the path information and child node information of the node's location, but it needs to modify the left and right index values ​​of all parent nodes when adding and deleting, so a lot of CPU time is required

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
  • A database access method for tree structure data
  • A database access method for tree structure data
  • A database access method for tree structure data

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0032] A tree-like data model is established based on attribute relationships, and each node in the tree-like structure has consistent attribute domains, data domains and pointer domains. The whole tree has only one root node, each node can have any number of child nodes, and each child node can only have one parent node. After the tree data structure nodes are established, each node can be traversed. The main thread sends database operation commands to the database operation thread, and the database operation thread calls the corresponding stored procedure to return the result.

[0033] figure 1 is the formation method of the measuring point ID; figure 2 It is the algorithm flow chart of adding a node. When adding a node, first determine whether it is the root node. If the root node does not exist, then the inserted node is the root node, and the left and right indexes are [1,2]. If the current node is not the root node, it is necessary to obtain the left and right index ...

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 access method of tree-like structure data. The method comprises the following steps that data logics are abstracted by an object-oriented method, and a tree-like structure data model is built; a data access thread is built beyond a main thread by a multi-thread technology; a corresponding relationship type database data table is built according to node information of the tree-like structure; storage processes such as data node addition, deletion, modification and query are built in the database. The database access method has the advantages that the problems of stack overflow caused by using depth recursion and client CPU (central processing unit) time occupation are solved, and the data addition, deletion, modification and query efficiency is improved.

Description

technical field [0001] The invention relates to the field of computer applications, in particular to a database access method for tree-structured data. Background technique [0002] Relational databases generally use foreign keys and multi-table joins to store data in non-linear relationships, which not only fail to take advantage of the query advantages of relational databases, but also waste a lot of storage space, resulting in data redundancy. Commonly used algorithms include Path Enumerations, Adjacency List, and ClosureTable. [0003] The path notation needs to record all the parent nodes of the current node on a data entity. In order to record the parent nodes of all nodes, each table of the database must open up fields equal to the depth N of the tree. [0004] The adjacency list model is based on the original data information to add a field to record the parent node ID of the current node. When adding a node, you only need to add a record; when deleting a node, if ...

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 ZHEJIANG UNIV
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