Multi-tenancy Database Write Redirection via Union Views
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Multi-tenancy database systems face challenges in efficiently managing data separation and write redirection, leading to issues with data consistency and scalability, particularly when transitioning between different system sharing types and deploying changes across shared and tenant containers.
Innovation Solution
The system employs a data split and sharing approach, using union views and key patterns to separate shared and tenant-specific data, allowing for unified access while ensuring data consistency and enabling seamless transitions between system sharing types, and efficient deployment of changes by exchanging shared database containers.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If data is stored in separate tenant database containers, then data separation and consistency are improved, but system complexity and resource consumption increase
Solution Approach 1:
The patent segments data into two distinct containers: a shared database container for common data and tenant-specific database containers for writable tenant data. This segmentation enables clear data separation while maintaining a unified access interface through the database interface layer, reducing the complexity of managing multiple independent systems.
Solution Approach 2:
The patent introduces a database interface layer as an intermediary between applications and the database containers. This interface layer handles write redirection, key pattern validation, and query routing, abstracting the complexity of data separation from applications while ensuring data consistency across the shared and tenant containers.
2Reliability
If write redirection is implemented for key patterns, then data consistency is improved, but query processing time increases
Solution Approach 1:
The patent pre-defines key patterns for different data types (e.g., customer keys starting with 'CUST', product keys with 'PROD') before runtime. When a write query arrives, the system quickly matches the key against predefined patterns to determine redirection targets, avoiding complex runtime analysis and minimizing processing delay.
Solution Approach 2:
The database interface layer automatically performs write redirection and key pattern validation without requiring application-level intervention. The system self-manages the complexity of routing writes to appropriate containers based on key patterns, reducing overhead compared to manual application logic.
3Quantity of substance
If shared database containers are used for read-only data, then resource consumption is reduced, but deployment complexity increases
Solution Approach 1:
The patent merges common data across multiple tenants into a single shared database container, eliminating redundant storage and reducing overall resource consumption. The database interface layer ensures that read queries to shared data are efficiently routed without requiring separate copies for each tenant.
Solution Approach 2:
The shared database container serves multiple tenants simultaneously for read-only operations, making it a universal data store. The system maintains compatibility with existing applications through the database interface layer, enabling multi-tenancy without requiring separate deployment logic for each tenant.
4Ease of operation
If union views are used for unified access, then ease of operation is improved, but data separation becomes less explicit
Solution Approach 1:
The patent creates a virtual copy of the data access interface through union views that present a unified appearance to applications. These views combine read-only shared data and writable tenant data into a single accessible structure, maintaining ease of operation while the underlying physical separation remains explicit in the database container architecture.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
The present disclosure involves systems, software, and computer implemented methods for data separation and write redirection in multi-tenancy database systems. One example method includes providing access to at least one application to a database system. A query is received from an application. A determination is made that the query is associated with a union view that provides unified access to a first read-only table in a shared database container and a first writable table in a tenant database container. A determination is made as to whether the query is a read query or a write query. In response to determining that the query is a read query, the query is processed using the union view. In response to determining that the query is a write query, the query is modified to use the first writable table and the query is processed using the writable table.