Multi-tenant Database Schema Online Updates
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In a multi-tenant database context, updating schema documents traditionally requires manual updates that can lead to undesirable downtime, as non-relational databases lack guarantees on when updates are available to all tenants, and managing conflicts between standard and custom schema definitions is challenging.
Innovation Solution
The database system defines different scopes for schema data, including a tenant view namespace scope that automatically inherits schema information from a top-level scope, using predetermined patterns to avoid naming collisions and enable online updates, allowing tenants to customize their schemas without downtime by propagating standard schema changes automatically.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If manual updates to tenant-specific metadata documents are performed, then schema updates can be applied, but database downtime occurs and service availability is reduced
Solution Approach 1:
The system performs preliminary actions by pre-compiling and storing standard schema definitions in a shared schema repository before they are needed for tenant-specific updates. When a standard schema update occurs, the new definitions are already prepared and can be automatically propagated to tenant metadata documents without requiring manual intervention or database downtime, thus maintaining service availability while enabling timely schema updates
Solution Approach 2:
The system creates and maintains copies of standard schema definitions in tenant-specific metadata documents. Instead of updating all tenant documents manually, the system automatically copies updated standard schema definitions to relevant tenant metadata documents, enabling schema propagation without manual intervention and avoiding database downtime while ensuring consistency across the multi-tenant environment
2Manufacturing precision
If standard schema definitions are updated, then schema information becomes current, but conflicts may arise with custom tenant definitions
Solution Approach 1:
The system segments schema definitions into two distinct categories: standard schema definitions stored in a shared schema repository and custom tenant-specific definitions stored in tenant metadata documents. This segmentation allows standard schema updates to be applied independently without affecting custom tenant definitions, eliminating conflicts while maintaining schema consistency for standard objects across all tenants
Solution Approach 2:
The system applies different update strategies to different parts of the schema system: standard schema definitions are automatically propagated to all tenants to ensure consistency, while custom tenant definitions are preserved locally and updated only when explicitly modified by the tenant. This local quality approach ensures that standard schema updates do not conflict with custom tenant definitions, as each segment is managed according to its specific requirements
3Reliability
If online updates are implemented, then service availability is maintained, but ensuring data integrity across all tenants becomes more challenging
Solution Approach 1:
The system implements feedback mechanisms that automatically detect and resolve conflicts between standard schema definitions and tenant-specific metadata documents during online updates. The conflict detection and resolution system provides feedback loops that ensure data integrity is maintained across all tenants even as schemas are updated in real-time, allowing service availability to be maintained without sacrificing data consistency
Solution Approach 2:
The system introduces an intermediary schema repository that acts as a buffer between standard schema definitions and tenant metadata documents. This intermediary layer manages the propagation of schema updates and resolves conflicts automatically, ensuring data integrity across all tenants while enabling online updates. The intermediary coordinates the update process, preventing data loss or inconsistency during real-time schema changes
Data Source
AI summary
Techniques are disclosed relating to updating schema information for multi-tenant databases. In some embodiments, a multi-tenant database system stores a standard schema for a database object, where the standard schema is shared by multiple tenants and a tenant-specific schema for the database object. The tenant-specific schema may include one or more tenant-specific custom elements for the database object. The system may enforce a naming scheme in which tenant-specific elements include a predetermined pattern that is not included in object elements of the standard schema. The system may, in response to detecting an update of the standard schema, automatically propagate the update to the tenant schema, while the tenant is online.


