Distributed Database Node Mapping for Record Insertion
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In distributed data storage systems, cross-node queries for complex queries across multiple data tables lead to low data insertion efficiency and slow data update speeds due to the need for data copying across nodes during record insertion processes.
Innovation Solution
A method and apparatus for a distributed database that determines the storage node for associated records based on a mapping relationship between foreign key identifiers and storage nodes, allowing records to be inserted directly to the appropriate node, thereby avoiding cross-node copying and improving insertion efficiency and update speed.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of time
If records in the associated dimension table are copied to the node where the fact table record is stored, then cross-node queries are avoided and query efficiency is improved, but data insertion efficiency and update speed deteriorate due to the additional copying overhead
Solution Approach 1:
The patent pre-establishes a mapping relationship between foreign key identifiers and storage nodes before data insertion occurs. This mapping relationship is stored in advance, allowing the system to directly determine the target storage node without performing data copying operations during insertion. The preliminary action of creating the mapping index eliminates the need for subsequent data movement operations.
Solution Approach 2:
The patent introduces a mapping relationship table as an intermediary structure that stores the correspondence between foreign key identifiers and storage nodes. This intermediary allows the system to resolve the location of associated records without directly copying data between nodes. The mapping table acts as a mediator that provides indirect access to the required data location information.
2Reliability
If data is distributed across multiple nodes with backup copies, then system reliability is improved, but cross-node queries increase and query efficiency deteriorates
Solution Approach 1:
The patent segments the data storage architecture by separating the dimension table data into dedicated storage nodes while allowing fact table records to be stored locally. This segmentation strategy ensures that dimension table records remain in their original storage locations with backup copies for reliability, while fact table queries can access necessary dimension data without cross-node operations. The segmentation creates a clear division of data responsibilities across nodes.
3Reliability
If related data is copied across nodes during record insertion, then data consistency between nodes is improved, but data update speed deteriorates due to the copying overhead
Solution Approach 1:
The patent enables each storage node to independently determine the location of associated records using the pre-established mapping relationship. When a record is inserted or updated, the storing node queries the mapping relationship to identify the target node and performs the insertion directly without requiring data copying from other nodes. This self-service mechanism maintains data consistency while eliminating the need for inter-node data copying operations.
Data Source
AI summary
A data storage method and apparatus for a distributed database which includes receiving, by a first node, a record insertion request, where the record insertion request carries a first record, and determining, by the first node according to a mapping relationship between a foreign key identifier and a storage node, a first storage node on which a first associated record that corresponds to the first record is located, where a primary key identifier of the first associated record is same as a foreign key identifier of the first record, and inserting, by the first node, the first record to a second node in the first storage nodes.


