Dual-Table Tree Data Processing for Database Reconfiguration
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing tree structure data processing systems in relational databases face performance issues, with the naive tree scheme excelling in update writing but deteriorating in search and read performance, while the nested set scheme performs well in search and read but poorly in update writing, leading to service response time disabilities during reconfiguration.
Innovation Solution
A system that synchronizes naive tree and nested set data tables, using the nested set table for retrieval processes and the naive tree table for update processes, maintaining data searching and reading performance without deteriorating during reconfiguration by switching between the two based on request types and synchronization states.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If the nested set scheme is used for tree structure data modeling, then search and read performance is improved, but update writing performance deteriorates
Solution Approach 1:
The patent divides the tree structure data into two separate tables: a naive tree data table for update operations and a nested set data table for search operations. This segmentation allows each table to be optimized for its specific purpose, resolving the contradiction between update performance and search performance.
Solution Approach 2:
The patent introduces a synchronization table as an intermediary between the naive tree data table and the nested set data table. This mediator automatically synchronizes data between the two tables, ensuring consistency while allowing each table to maintain its optimization for specific operations.
2Productivity
If the naive tree scheme is used for tree structure data modeling, then update writing performance is improved, but search and read performance deteriorates
Solution Approach 1:
The patent divides the tree structure data into two separate tables: a naive tree data table for update operations and a nested set data table for search operations. This segmentation allows each table to be optimized for its specific purpose, resolving the contradiction between update performance and search performance.
3Speed
If the nested set scheme is used, then data searching and reading performance is excellent, but reconfiguration of tree structure causes service response time disabilities
Solution Approach 1:
The patent divides the tree structure data into two separate tables: a naive tree data table for update operations and a nested set data table for search operations. This segmentation allows each table to be optimized for its specific purpose, resolving the contradiction between update performance and search performance.
Solution Approach 2:
The patent performs update operations on the naive tree data table first, which has better update performance, before synchronizing to the nested set data table. This preliminary action on the optimized table reduces service response time during reconfiguration.
4Productivity
If dual data tables are synchronized, then both update and search performance are maintained, but system complexity increases
Solution Approach 1:
The patent introduces a synchronization table as an intermediary between the naive tree data table and the nested set data table. This mediator automatically synchronizes data between the two tables, ensuring consistency while allowing each table to maintain its optimization for specific operations.
Solution Approach 2:
The patent implements automatic synchronization mechanisms that self-manage the data consistency between the two tables without requiring manual intervention. The system automatically detects changes and propagates them across tables, reducing the operational complexity despite the dual-table structure.
Data Source
AI summary
[Problem] In reconfiguration of a tree structure in a relational database, to reduce a service response-disabled time by an update lock, and to maintain data retrieving and reading performance without deterioration.[Solution] A tree structure data processing device 10 of a tree structure data processing system 1000 includes a process thread setting unit and a synchronization state management unit. The process thread setting unit starts and performs a request process thread for retrieval processing with reference to a nested set data table and starts and performs a request process thread 150 for updating data of a naive tree data table. The synchronization state management unit switches a state of the request process thread 150 to a synchronization waiting state when receiving synchronization waiting instruction information indicating start of a synchronization process between the naive tree data table and the nested set data table. A synchronization device includes a synchronization processing unit that converts data of the naive tree data table updated in response to an update request into data of the nested set data table to perform synchronization.


