Difference-based database upgrade
AssigneeMicrosoft Corporation
InventorsAndrey A. Zaytsev, Jigar B. Thakkar, Sonja Jackson
Life of this patent
Estimating the term…
Abstract
A method for updating a database that combines the advantages of both the migration and incremental approach may resolve some of the problems associated with earlier methods. This may be accomplished by a methodology which incrementally updates new data while using the migration approach to create an entirely new schema. Such a method might compare the metadata from both the existing database and the data update to generate a new schema and integrate new data into the database.
Claims11
A computing device comprising:
- a processor;
- a memory;
- and
- a database updating application maintained in the memory and executed on the processor to:
- serialize a first metadata to a common information format, wherein the first metadata describes a current database schema;
- serialize a second metadata to the common information format, wherein the second metadata describes an updated database schema;
- deserialize the first metadata in the common information format to a first comparable object;
- deserialize the second metadata in the common information format to a second comparable object;
- load the first comparable object into a first cache;
- load the second comparable object into a second cache;
- compare the first comparable object and the second comparable object to determine one or more differences between the current database schema and the updated database schema;
- generate one or more instructions for each of the differences between the current database schema and the updated database schema, each instruction to modify the current database to conform to the updated database schema;
- and
- derive a script from the one or more instructions, to be executed by the processor, the script including a first phase to be executed before a second phase, wherein the first phase instructions consist of:
- adding the updated database entity, updating the current database entity, adding the updated database attribute, and updating the current database attribute, the second phase instructions consist of:
- deleting the current database entity, deleting the current database attribute, deleting the current database relationship, deleting a current database view, adding the updated database relationship, and creating an updated database view, and the first comparable object and the second comparable object are in an identical file format.
A computing device comprising:
- a processor;
- a memory;
- and
- a database updating application maintained in the memory and executed on the processor to:
- serialize a first metadata file to a first XML file, the metadata describing the current database schema;
- deserialize the first XML file to a first comparable object;
- load the first comparable object into a first cache;
- serialize a database update file to a second XML file, the database update file describing an updated version of the current database schema and consisting of a new entity, a new attribute, and a new relationship;
- deserialize the second XML file to a second comparable object;
- load the second comparable object into a second cache;
- compare the first comparable object and the second comparable object to determine one or more differences between the current database schema and the updated database schema;
- generate one or more instructions for each of the differences between the current database schema and the updated database schema, each instruction including a command to modify the current database to conform to the updated database schema;
- and
- derive a script including the one or more instructions, to be executed by a processor, the script consisting of a first phase to be executed before a second phase;
- wherein the first phase instructions consist of:
- adding the updated database entity, updating the current database entity, adding the updated database attribute, and updating the current database attribute, the second phase instructions consist of:
- deleting the current database entity, deleting the current database attribute, deleting the current database relationship, deleting a current database view, adding the updated database relationship, and creating an updated database view, and the first comparable object and the second comparable object are in an identical file format.
A computer storage medium storing computer executable instructions executed by a processor for updating a current database comprising computer executable instructions for:
- loading a first metadata from the current database into a first cache, wherein the first metadata describes a current database schema;
- loading a second metadata from a database next release file into a second cache, wherein the second metadata describes an updated database schema;
- modifying one or more of the first metadata and the second metadata so that both the first metadata and the second metadata are in a common information format;
- comparing the first common information formatted metadata and the second common information formatted metadata to determine one or more differences between the current database schema and the updated database schema;
- generating one or more instructions for each of the differences between the current database schema and the updated database schema, each instruction including a command to modify the current database to conform to the updated database schema;
- and
- deriving a script including the one or more instructions, to be executed by the processor, the script consisting of a first phase to be executed before a second phase, wherein the first phase instructions consist of:
- adding the updated database entity, updating the current database entity, adding the updated database attribute, and updating the current database attribute, the second phase instructions consist of:
- deleting the current database entity, deleting the current database attribute, deleting the current database relationship, deleting a current database view, adding the updated database relationship, and creating an updated database view, and the first common information formatted metadata and the second common information formatted metadata are in an identical file format.
Dependencies are inferred from the claim text.