Ledger Database Index View Updates via Atomic Write Operations
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Database management systems, particularly relational and non-relational databases, face limitations in efficiently updating indexes and views due to issues like retrieval latency and contention introduced by locking mechanisms, especially in distributed ledger systems.
Innovation Solution
A ledger-based database management system employs an optimistic concurrency model to compute and apply sets of write operations as atomic units, minimizing lock acquisition and optimizing updates by generating operations based on available data without direct access to storage nodes, and using summary and journal data structures for efficient query processing.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If locking mechanisms are used to update indexes and views in distributed ledger systems, then data consistency is maintained, but retrieval latency increases and contention is introduced
Solution Approach 1:
The system performs preliminary computation of write operations for indexes and views before applying them. The query processor computes the complete set of write operations based on the command to update a document, then applies these operations as an atomic unit. This preliminary computation allows the system to prepare updates in advance without requiring continuous locking, reducing retrieval latency while maintaining consistency through atomic application.
Solution Approach 2:
The system creates a copy of the update operations in the form of write operation commands that can be applied independently to the ledger, indexes, and views. These written operations are computed based on available data without direct access to storage nodes, allowing the update logic to be separated from the storage layer and applied atomically, thereby reducing contention and latency while ensuring data consistency.
2Reliability
If locking mechanisms are used to update indexes and views, then data consistency is maintained, but locking conflicts increase
Solution Approach 1:
The system generates write operations as independent commands that can be applied to indexes and views without requiring locks on the actual data. The query processor computes write operations based on the update command and applies them as an atomic unit, eliminating the need for traditional locking mechanisms and thereby reducing locking conflicts while maintaining data consistency through the atomic nature of the operations.
Solution Approach 2:
The system replaces the mechanical locking mechanism with a computational approach where write operations are computed and applied atomically. Instead of using locks to control access to indexes and views, the system uses the atomic application of pre-computed write operations, substituting the mechanical locking system with a computational model that achieves the same consistency guarantees without the harmful locking conflicts.
3Productivity
If direct access to storage nodes is used for updates, then update speed is improved, but system complexity increases
Solution Approach 1:
The query processor acts as an intermediary between the update command and the storage nodes. It receives the command to update a document, computes the necessary write operations for indexes and views based on available data, and then applies these operations. This intermediary layer abstracts the complexity of direct storage node access, allowing updates to be performed efficiently through computed operations without increasing system complexity by exposing the underlying storage architecture.
Data Source
AI summary
A database management system stores data for a table using a ledger which comprises journal and summary portions. A query processor of the database identifies a first set of operations to update a document of a table in accordance with an update command. The query processor identifies a second set of operations to update tables or views that are potentially affected by the update to the document. The query processor then causes the first and second sets of operations to be executed as an atomic unit.


