IP Library Granted Patent US 11,709,807
Granted Patent B2
US 11,709,807 · App. 17/241,507 · Granted Jul 25, 2023

Optimized tenant schema generation

Inventor: Howard Proctor (Raleigh, NC)
Assignee: Red Hat, Inc.
G06F16/211G06F16/214G06F16/2433
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,709,807
App. No.
17/241,507
Granted
Jul 25, 2023
Kind
B2
Abstract

A system includes a memory and a processor, where the processor is in communication with the memory. The processor is configured to receive a request to create a tenant schema within a database, where the database includes one or more tenant schemas associated with one or more tenants. The tenant schema associated with a tenant of the one or more tenants is created, where the tenant schema is empty. It is determined whether the database includes a template schema. Upon determining the template schema exists, command is sent to the database to copy the template schema to the tenant schema associated with the tenant.

Claims (41)

1. A system, comprising:

a memory; and a processor in communication with the memory, wherein the processor is configured to:

receive, at an application executed on a virtual machine, a request to create a tenant schema within a database, wherein the database includes one or more tenant schemas associated with one or more tenants;

in response to the request, create the tenant schema associated with a tenant of the one or more tenants, wherein the tenant schema is empty, wherein the one or more tenants have at least one of common access to or privileges to the database;

updating the empty tenant schema according to migration files of other tenant schemas;

determine whether the database includes a template schema, wherein the template schema tracks a previous state and a current state of each tenant schema of the tenant schemas on the database to create new tenant schemas;

upon determining the template schema exists, send by the application executed on the virtual machine, a copy command to the database to copy the template schema to the tenant schema associated with the tenant; and

upon determining that the database lacks a template tenant, migrate a second tenant schema to a new tenant schema, wherein the migration of the second tenant schema includes copying modifications made to another tenant schema, and wherein the migration comprises recording a state of migrations of the other tenant schemas on the database to resolve a state of the template schema.

2. The system of claim 1 , wherein the processor is further configured to:

upon determining the database lacks the template schema, migrate a new schema to use as the template schema.

3. The system of claim 2 , wherein migration comprises recording a state of migrations of other tenant schemas on the database to resolve a state of the template schema.

4. The system of claim 2 , wherein the processor is further configured to:

update the template schema with migration changes applied to other tenant schemas in the database.

5. The system of claim 1 , wherein the template schema includes tables corresponding to each schema stored within the database.

6. The system of claim 1 , wherein the database is a structured query language (SQL) database.

7. The system of claim 1 , wherein a tenant is a group of users having common access and common privileges to the database.

8. A method, comprising:

receiving, at an application executed on a virtual machine, a request to create a tenant schema within a database, wherein the database includes one or more tenant schemas associated with one or more tenants;

in response to the request, creating the tenant schema associated with a tenant of the one or more tenants, wherein the tenant schema is empty, wherein the one or more tenants have at least one of common access to or privileges to the database;

updating the empty tenant schema according to migration files of other tenant schemas;

determining whether the database includes a template schema, wherein the template schema tracks a previous state and a current state of each tenant schema of the tenant schemas on the database to create new tenant schemas;

upon determining the template schema exists, sending by the application executed on the virtual machine, a copy command to the database to copy the template schema to the tenant schema associated with the tenant; and

upon determining that the database lacks a template tenant, migrating a second tenant schema to a new tenant schema, wherein the migration of the second tenant schema includes copying modifications made to another tenant schema, and wherein the migration comprises recording a state of migrations of the other tenant schemas on the database to resolve a state of the template schema.

9. The method of claim 8 , further comprising: upon determining the database lacks the template schema, migrating a new schema to use as the template schema.

10. The method of claim 9 , wherein migration comprises recording a state of migrations of other tenant schema on the database to resolve a state of the template schema.

11. The method of claim 9 , wherein the processor is further configured to: updating the template schema with migration changes applied to other tenant schemas in the database.

12. The method of claim 8 , wherein the template schema includes tables corresponding to each schema stored within the database.

13. The method of claim 8 , wherein the database is a structured query language (SQL) database.

14. The method of claim 8 , wherein the tenant is a group of users having common access and common privileges to the database.

15. A non-transitory machine readable medium storing code, which when executed by a processor is configured to:

receive, at an application executed on a virtual machine, a request to create a tenant schema within a database, wherein the database includes one or more tenant schemas associated with one or more tenants;

in response to the request, create the tenant schema associated with a tenant of the one or more tenants, wherein the tenant schema is empty, wherein the one or more tenants have at least one of common access to or privileges to the database;

update the empty tenant schema according to migration files of other tenant schemas;

determine whether the database includes a template schema, wherein the template schema tracks a previous state and a current state of each tenant schema of the tenant schemas on the database to create new tenant schemas;

upon determine the template schema exists, send by the application executed on the virtual machine a copy command to the database to copy the template schema to the tenant schema associated with the tenant; and

upon determine that the database lacks a template tenant, migrate a second tenant schema to a new tenant schema, wherein the migration of the second tenant schema includes copying modifications made to another tenant schema, and wherein the migration comprises recording a state of migrations of the other tenant schemas on the database to resolve a state of the template schema.

16. The non-transitory machine readable medium of claim 15 , wherein the code, when executed by a processor, is further configured to: upon determining the database lacks the template schema, migrate a new schema to use as the template schema.

17. The non-transitory machine readable medium of claim 16 , wherein migration comprises recording a state of migrations of other tenant schema on the database to resolve a state of the template schema.

18. The non-transitory machine readable medium of claim 16 , wherein the code, when executed by a processor, is further configured to: update the template schema with migration changes applied to other tenant schemas in the database.

19. The non-transitory machine readable medium of claim 15 , wherein the template schema includes tables corresponding to each schema stored within the database.

20. The non-transitory machine readable medium of claim 15 , wherein the database is a structured query language (SQL) database.

Assignments (2)
CHANGE OF NAME Recorded Mar 3, 2026
From: RED HAT, INC.
To: RED HAT, LLC
Reel/Frame 074913/0759 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 27, 2021
From: PROCTOR, HOWARD
To: RED HAT, INC.
Reel/Frame 056056/0729 →
Cited By (1)
US 12,360,779