IP Library Granted Patent US 9,280,568
Granted Patent B2
US 9,280,568 · App. 13/682,295 · Granted Mar 8, 2016

Zero downtime schema evolution

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 9,280,568
App. No.
13/682,295
Granted
Mar 8, 2016
Kind
B2
Abstract

A method for updating a database schema may include maintaining a database, database schema and a first version of an application. The method may include generating application schema for the first version of the application, the application schema including a mapping of one or more classes of the application to a respective table in the database. The method may include executing the first version of the application and storing an application data object in the database in accordance with the application schema. While the first version of the application is executing, the method may include receiving a request to update the first version of the application to a different version, identifying application metadata for the different version of the application, comparing the application metadata for the different version of the application with the database schema for the database, and updating the database schema based on the comparison.

Claims (64)

1. A method, comprising:

maintaining a database having one or more tables;

maintaining database schema for the database, the database schema describing the one or more tables in the database and columns in the one or more tables;

maintaining a first version of an application having application metadata that includes information about one or more classes of the first version of the application;

generating application schema for the first version of the application, the application schema comprising a mapping of the one or more classes of the first version of the application to a respective table in the database;

executing the first version of the application;

storing an application data object in the database in accordance with the application schema; and

while the first version of the application is executing:

receiving a request to update the first version of the application to a different version of the application;

identifying application metadata for the different version of the application;

comparing the application metadata for the different version of the application with the database schema for the database; and

updating the database schema for the database based on the comparison.

2. The method of claim 1 , wherein the application metadata describes a persistent class of the first version of the application and persistent members of the first version of the application.

3. The method of claim 1 , wherein storing the application data object in the database comprises generating SQL commands in accordance with the application schema and issuing the SQL commands to the database.

4. The method of claim 1 , wherein storing the application data object in the database comprises:

identifying, from the mapping of the one or more classes of the first version of the application to the respective table in the database, a location of the respective table in the database;

the database based on the identifying;

issuing the instructions to a database management system associated with the database to store the application data object; and

updating the database schema to reflect the storing of the application data object.

5. The method of claim 1 , wherein the application schema includes a mapping of the first application data object to the respective table of the database and wherein the application data object is stored in the respective table of the database.

6. The method of claim 1 , wherein the mapping in the application metadata for the first version of the application identifies one or more columns of the respective table where portions of the application data object are stored.

7. The method of claim 1 , further comprising updating the first version of the application to the different version of the application.

8. The method of claim 1 , further comprising:

generating application schema for the different version of the application based on the application metadata for the different version of the application; and

storing a second application object in the database in accordance with the application schema for the different version of the application.

9. The method of claim 1 , wherein the comparing comprises determining that a particular table is described in the application metadata for the different version of the application but not in the database schema, and wherein the updating includes generating instructions to add a description of the particular table to the database schema and issuing the instructions to a database management system associated with the database.

10. The method of claim 1 , wherein the comparing comprises determining that a particular column is described in the application metadata for the different version of the application but not in the database schema, and wherein the updating includes generation instructions to add a description of the particular column to the database schema and issuing the instructions to a database management system associated with the database.

11. A non-transitory computer readable storage medium storing one or more programs configured to be executed by a processor, the one or more programs comprising instructions for:

maintaining a database having one or more tables;

maintaining database schema for the database, the database schema describing the one or more tables of the database;

maintaining an application having application metadata that includes information about one or more classes of the application;

generating application schema for the application that includes a mapping of the one or more classes of the application to a table in a database;

executing the application;

storing an application data object in the database in accordance with the application schema; and

while the application is executing:

detecting a request to the database from the application;

identifying application metadata for the application;

comparing, in response to the request from the application, the application metadata with the database schema;

generating instructions to update the database schema based on the comparison; and

updating the database schema with the instructions.

12. The non-transitory computer readable storage medium of claim 11 , further comprising:

identifying, from the mapping of the one or more classes of the first application to a respective table in the database, a location of the respective table in the database;

generating instructions to store a second application data object in the respective table of the database based on the identifying;

issuing the instructions to a database management system associated with the database to store the application data object; and

updating the database schema to reflect the storing of the second application data object.

13. The non-transitory computer readable storage medium of claim 11 , wherein the application schema further comprises a mapping of the application data object to the table in the database.

14. The non-transitory computer readable storage medium of claim 11 , wherein the mapping in the application schema identifies one or more columns of the table where portions of the application data object are stored.

15. The non-transitory computer readable storage medium of claim 11 , wherein the comparing comprises determining that a particular table is described in the application schema but not in the database schema, wherein generated instructions add a description of the particular table to the database schema, and wherein the updating includes issuing the instructions to a database management system associated with the database.

16. The non-transitory computer readable storage medium of claim 11 , wherein the comparing comprises determining that a particular column is described in the application metadata but not in the database schema, wherein the generated instructions add a description of the particular column to the database schema, and wherein the updating includes issuing the instructions to a database management system associated with the database.

17. A server system, comprising:

one or more processors; and

memory storing one or more programs for execution by the one or more processors, the one or more programs including instructions for:

maintaining a database having one or more tables;

maintaining database schema for the database, the database schema describing the one or more tables of the database;

maintaining an application having application metadata that includes information about one or more classes of the application;

generating application schema for the application that includes a mapping of the one or more classes of the application to a table in a database;

executing the application;

storing an application data object in the database in accordance with the application schema; and

while the application is executing:

detecting a request to the database from the application;

identifying application metadata for the application;

comparing, in response to the request from the application, the application metadata with the database schema;

generating instructions to update the database schema based on the comparison; and

updating the database schema with the instructions.

Assignments (2)
CHANGE OF NAME Recorded Aug 26, 2014
From: SAP AG
To: SAP SE
Reel/Frame 033625/0223 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 20, 2012
From: MCCAFFREY, GERARD
To: SAP AG
Reel/Frame 029332/0008 →