Graph Database Storage Splitting Retrieval and Attribute Data
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Graph databases face limitations in handling large-scale data analysis due to memory constraints, leading to inefficient query performance from frequent disk access.
Innovation Solution
Store attribute information on disk and retrieval information on memory, allowing queries to be performed directly from memory using retrieval information, reducing disk access and optimizing storage efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If all graph data is stored in memory, then query efficiency is improved, but storage capacity is limited
Solution Approach 1:
The patent segments graph data into two distinct parts: retrieval information (stored in memory for fast access) and attribute information (stored in disk for capacity). This segmentation allows the system to maintain both high query efficiency and large storage capacity by placing different data components in appropriate storage locations based on their access patterns and size requirements.
Solution Approach 2:
The patent extracts the attribute information from the graph data and stores it separately on disk, while keeping only the retrieval information in memory. This extraction reduces the memory footprint significantly, enabling the system to handle large-scale graph data without being constrained by limited memory capacity, while still maintaining fast query performance through the retrieval information index.
2Quantity of substance
If all graph data is stored on disk, then storage capacity is increased, but query efficiency deteriorates due to frequent disk access
Solution Approach 1:
The patent segments graph data into retrieval information (for memory storage) and attribute information (for disk storage). This segmentation enables the system to maintain large storage capacity on disk while avoiding frequent disk accesses during queries, as the retrieval information index allows fast access to needed data without reading the entire disk-based attribute information.
Solution Approach 2:
The patent introduces retrieval information as an intermediary between the user query and the disk-stored attribute information. This intermediary layer in memory acts as a cache or index that mediates access to the disk, allowing the system to retrieve needed data quickly from memory without repeatedly accessing the disk, thus maintaining both capacity and efficiency.
3Speed
If retrieval information and storage location are stored in memory, then query speed is improved, but memory usage increases
Solution Approach 1:
The patent extracts only the essential retrieval information and storage location pointers from the full graph data and stores these minimal representations in memory. This extraction significantly reduces memory usage compared to storing complete graph data, while still enabling fast query operations through the compact retrieval information index that points to disk-stored attribute data.
Data Source
Figure 1~2
Figure 3~4
Figure 5~6
AI summary
One or more embodiments of this specification provide a data storage method and apparatus for a graph database. The method includes: obtaining graph data to be stored, where the graph data include retrieval information and attribute information corresponding to a graph data object, and the retrieval information is used to perform retrieval query on the graph data; storing the attribute information into a disk managed by a storage engine corresponding to the graph database, and obtaining a storage location of the attribute information on the disk; and further storing the retrieval information corresponding to the graph data object and the storage location into a memory managed by the storage engine, so that a user can query the graph data based on the retrieval information in the memory.