Cross-Database Transaction Coordination via Mediator Pattern
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current systems face challenges in managing transactions across databases of different types, requiring complex coordination and separate processing, especially when accessing and manipulating data in both in-memory relational databases and disk-based databases like document stores.
Innovation Solution
A database system that coordinates transactions between a first in-memory relational database and a second database, such as a document store, using transaction managers to ensure data consistency and persistence across both systems, allowing for a single query to access and manipulate data from different database types.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If separate and distinct queries are used to access data within respective database types, then data access is straightforward for each database type, but system complexity increases and productivity decreases
Solution Approach 1:
The patent implements a universal query interface that can access multiple database types (relational, document, graph, etc.) through a single query language. The query processor translates high-level queries into type-specific operations, allowing users to query across heterogeneous databases without learning multiple query languages or issuing separate queries for each database type.
2Reliability
If separate transaction managers are used for different database types, then each database type maintains its transaction integrity, but coordination complexity increases
Solution Approach 1:
The patent introduces a coordinator transaction manager that acts as an intermediary between multiple database-specific transaction managers. The coordinator receives high-level transaction requests, decomposes them into sub-transactions for each database type, coordinates their execution, and ensures atomic commit or rollback across all databases. This mediator approach maintains transaction integrity for each database type while simplifying the overall coordination mechanism.
3Adaptability or versatility
If data is stored across multiple databases of varying types, then data organization is optimized for different access patterns, but transaction management complexity increases
Solution Approach 1:
The patent segments the transaction management system into multiple independent components: a coordinator transaction manager that handles high-level transaction coordination, and database-specific transaction managers that handle type-specific operations. Each database type (relational, document, graph) has its own transaction manager that understands its specific protocols and constraints. This segmentation allows each component to be optimized independently while working together through standardized interfaces.
4Productivity
If concurrent user access to large amounts of data is enabled, then system scalability is improved, but data consistency across databases becomes harder to maintain
Solution Approach 1:
The patent implements feedback mechanisms where the coordinator transaction manager continuously monitors the state of sub-transactions across different databases and adjusts coordination strategies accordingly. The system uses status reporting from each database transaction manager to determine commit/rollback decisions, ensuring that concurrent transactions maintain consistency even under high load. This feedback loop enables the system to handle concurrent access while preserving data integrity.
Data Source
AI summary
A database system can receive, from a client, a query specifying at least one database operation implicating data within a first database and within a second database. The first database can have a first transaction manager and the second database can have a second transaction manager. Thereafter, a plurality of transactions are initiated that are responsive to the query to access the data within the first database and the second database. The first transaction manager and the second transaction manager together coordinate execution of the plurality of transactions. All changes specified by the at least one database operation are persisted in persistence of the first database including changes implicating data stored within the second database. Data responsive to the query can then optionally be provided to the client. Related apparatus, systems, techniques and articles are also described.


