Database access method of tree-like structure data

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

Active Publication Date: 2015-07-29
ZHEJIANG UNIV
View PDF2 Cites 14 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 i

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 access method of tree-like structure data
  • Database access method of tree-like structure data
  • Database access method of tree-like structure data

Examples

Experimental program
Comparison scheme
Effect test

Example Embodiment

[0031] Example

[0032] A tree-like data model is established according to the attribute relationship, and each node in the tree-like structure has a consistent attribute domain, data domain and pointer domain. The entire 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-like data structure nodes are established, each node can be traversed. The main thread sends the database operation command to the database operation thread, and the database operation thread calls the corresponding stored procedure to return the result.

[0033] figure 1 It is the formation method of measuring point ID; figure 2 It is the algorithm flow chart of adding a node. When adding a node, you must first determine whether it is the root node. If the root node does not exist, 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 node, you need ...

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 Closure Table. [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
IPC IPC(8): G06F17/30
Inventor 王友钊黄静
Owner ZHEJIANG UNIV
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