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

Method and device for storing and inquiring tree structure data in relational database

A tree structure, relational technology, applied in the computer field, can solve problems such as consuming large system resources, false crashes, affecting query efficiency, etc., to achieve the effect of improving query efficiency and reducing response time

Inactive Publication Date: 2013-09-04
NO 15 INST OF CHINA ELECTRONICS TECH GRP
View PDF4 Cites 18 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The recursive query method consumes a lot of system resources, and the query response time is long, especially when there are many levels in the tree structure, and even a false crash occurs, which seriously affects the efficiency of the query.
[0009] To sum up, after the tree structure data is stored in the relational database using existing methods, the data of each upper node of any node in the tree structure, or the data of each lower node of the node is queried in the relational database inefficiency

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 storing and inquiring tree structure data in relational database
  • Method and device for storing and inquiring tree structure data in relational database
  • Method and device for storing and inquiring tree structure data in relational database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0055] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be described in further detail below with reference to the accompanying drawings and preferred embodiments. However, it should be noted that many of the details listed in the specification are only for readers to have a thorough understanding of one or more aspects of the present invention, and these aspects of the present invention can be implemented even without these specific details.

[0056] As used herein, terms such as "module" and "system" are intended to include computer-related entities such as, but not limited to, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a module may be, but is not limited to being limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and / or a computer. For example, both an applicatio...

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 storing and inquiring tree structure data in a relational database. The method includes storing data and a rank sequence of each node in a tree structure in a data line in the relational database. The data lines in the relational database respectively correspond to the nodes in the tree structure, A process for determining the rank sequence of each node includes determining a path from a root node to the node in the tree structure if the node is a non-root node, and composing the rank sequence of the node according to codes of various nodes in the path of the node. The method and the device have the advantages that the rank sequences of the nodes are stored in the relational database, rank sequences of various superior nodes of an optional non-root node can be acquired by means of analyzing the rank sequence of the optional non-root node, and the various rank sequences are used as inquiry conditions, so that data lines of the various superior nodes of the optional non-root node can be directly inquired in the relational database, a recursion mode for inquiring the data is omitted, and the inquiry efficiency is improved.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a storage and query method and device for tree structure data in a relational database. Background technique [0002] In daily life and work, data with hierarchical relationships has been widely used, such as structural data applied to library management, structured data applied to organizational management, etc. The hierarchical relationship between the structured data is usually represented by a tree Each node in the tree structure represents a piece of data, and the relationship between nodes represents the relationship between data. [0003] Currently, the database used to store data is usually a relational database; in practical applications, it is often necessary to use a relational database to store tree-structured data, and then query the tree-structured data stored in the relational database. [0004] Relational databases usually store data in the form of tables, wher...

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 NO 15 INST OF CHINA ELECTRONICS TECH GRP
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