Cross Row Consistent Data Access via Index Table
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Non-relational databases, such as key-value stores, only guarantee single row consistency, leading to incomplete data output when updating multiple rows, as they do not ensure cross-row data consistency during data updates, resulting in readers obtaining partial views of newly updated data.
Innovation Solution
Implement a system that uses a stats table and an index table to ensure cross-row consistency by periodically updating the index table with the latest data from the stats table, allowing for transactional updates and queries, and utilizing the index table to fetch current data values during queries.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If non-relational database is used for data storage and retrieval, then scalability and flexible data schema are improved, but cross-row data consistency deteriorates
Solution Approach 1:
The patent segments the data access mechanism into two distinct components: a stats table for storing updated data and an index table for maintaining consistency pointers. This segmentation allows the system to maintain flexible schema in the stats table while ensuring cross-row consistency through the index table's version tracking mechanism.
Solution Approach 2:
The index table acts as an intermediary between the stats table and the query operation. It mediates consistency by storing version information and row keys that point to the latest consistent state of data across multiple rows, enabling readers to obtain complete views even during updates.
2Productivity
If non-relational database updates multiple rows, then data update capability is improved, but data consistency deteriorates
Solution Approach 1:
The system performs preliminary actions by maintaining an index table that anticipates consistency requirements before queries occur. The index table pre-stores version information and row key mappings, so when multiple rows are updated, readers can immediately retrieve consistent data without waiting for update completion, thus maintaining both high update productivity and data consistency.
Solution Approach 2:
The index table creates a copy or snapshot of the consistency state by storing pointers to the latest version of each row in the stats table. This copying mechanism allows the system to maintain multiple rows with high update speed while ensuring that readers always access a consistent snapshot of the data.
3Ease of operation
If single row consistency is guaranteed, then transaction simplicity is improved, but cross-row data completeness deteriorates
Solution Approach 1:
The patent adds another dimension to the data storage structure by introducing the index table alongside the stats table. This dimensional expansion allows the system to maintain simple single-row transactions in the stats table while the index table provides the additional layer needed for cross-row consistency, preventing information loss without complicating the core transaction mechanism.
Data Source
AI summary
A method and a system include, for each predetermined time period in a plurality of predetermined time periods, writing a plurality of data rows comprising a set of data associated with a plurality of active entities, and updating an index table based on the plurality of data rows in the stats table, wherein the index table comprises an index row. The method further includes receiving from an electronic device via an interface a query corresponding to an entity, retrieving an index value from an index row included an index row, retrieving the current value from the stats table using the index value, generating a response to the query using the index value and the current value, and displaying the response on a display of the electronic device.


