Relational database schema version management
First Claim
1. A method for generating an installation file for a particular version of a relational database, the method comprising:
- given a database system of a particular version, the particular version being unknown prior to execution of the method, determining the particular version of the relational database wherein metadata exists that describes a sequence of multiple versions of the relational database where each version is an upgrade from a previous version, and the particular version is not a first version in the sequence;
automatically determining a first set of scripts, the first set of scripts comprising data definition language (DDL) scripts associated with implementing the particular version of the relational database, wherein the first set of scripts are selected from a plurality of scripts, one or more of the plurality of scripts being not associated with implementing the particular version;
the automatically determining a first set of scripts comprising;
extracting a set A1 comprising one or more filenames from metadata associated with a first version in the sequence, the one or more filenames associated with a file comprising a data definition language (DDL) script associated with the first version;
iteratively extracting a set Ai comprising zero or more filenames from metadata associated with an ith version of the relational database, the zero or more filenames each associated with a file comprising a data definition language script to be executed when upgrading from version i−
1 of the relational database to version i of the relational database, where i varies incrementally from 2 to j, where the particular version is j; and
determining the first set of scripts as a set theory union of sets A1, A2, . . . , Aj;
automatically determining a second set of scripts, the second set of scripts comprising data manipulation language (DML) scripts associated with implementing the particular version of the relational database, wherein the second set of scripts are selected from a plurality of scripts, one or more of the plurality of scripts being not associated with implementing the particular version;
the automatically determining a second set of scripts comprising;
extracting a set A1 comprising one or more filenames from metadata associated with a first version in the sequence, the one or more filenames associated with a file comprising a data manipulation language (DML) script associated with the first version;
iteratively extracting a set Ai comprising zero or more filenames from metadata associated with an ith version of the relational database, the zero or more filenames each associated with a file comprising a data manipulation language script to be executed to add or modify a DML object when upgrading from version i−
1 of the relational database to version i of the relational database, where i varies incrementally from 2 to j, where the particular version is j;
iteratively extracting a set Bi comprising zero or more filenames from metadata associated with an ith version of the relational database, the zero or more filenames each associated with a file comprising a DML drop script to be executed to drop a DML object when upgrading from version i−
1 of the relational database to version i of the relational database, where i varies incrementally from 2 to j, where the particular version is j; and
determining the second set of scripts Cj by determining;
C2=[A1∪
A2]−
B2;
C3=[C2∪
A3]−
B3;
C4=[C3∪
A4]−
B4;
. . .
Cj=[Cj−
1∪
Aj]−
Bj;
andgenerating an installation file comprising a set theory union of the first set of scripts and the second set of scripts.
2 Assignments
0 Petitions
Accused Products
Abstract
Techniques for managing multiple versions of relational database schema data are described. Schema data associated with multiple versions of a relational database are maintained according to a database schema version management structure. Laws of set theory are applied to the structured database schema data to identify data definition language (DDL) and data manipulation language (DML) scripts that are associated with a particular version of the relational database. The identified scripts are then copied into an installation file that can be executed to create a full install of the particular version of the relational database. Similarly, laws of set theory are applied to the structured database schema data to identify DDL scripts, DML scripts, and drop scripts that are to be applied to upgrade from one version of the relational database to a newer version of the relational database.
-
Citations
12 Claims
-
1. A method for generating an installation file for a particular version of a relational database, the method comprising:
-
given a database system of a particular version, the particular version being unknown prior to execution of the method, determining the particular version of the relational database wherein metadata exists that describes a sequence of multiple versions of the relational database where each version is an upgrade from a previous version, and the particular version is not a first version in the sequence; automatically determining a first set of scripts, the first set of scripts comprising data definition language (DDL) scripts associated with implementing the particular version of the relational database, wherein the first set of scripts are selected from a plurality of scripts, one or more of the plurality of scripts being not associated with implementing the particular version; the automatically determining a first set of scripts comprising; extracting a set A1 comprising one or more filenames from metadata associated with a first version in the sequence, the one or more filenames associated with a file comprising a data definition language (DDL) script associated with the first version; iteratively extracting a set Ai comprising zero or more filenames from metadata associated with an ith version of the relational database, the zero or more filenames each associated with a file comprising a data definition language script to be executed when upgrading from version i−
1 of the relational database to version i of the relational database, where i varies incrementally from 2 to j, where the particular version is j; anddetermining the first set of scripts as a set theory union of sets A1, A2, . . . , Aj; automatically determining a second set of scripts, the second set of scripts comprising data manipulation language (DML) scripts associated with implementing the particular version of the relational database, wherein the second set of scripts are selected from a plurality of scripts, one or more of the plurality of scripts being not associated with implementing the particular version; the automatically determining a second set of scripts comprising; extracting a set A1 comprising one or more filenames from metadata associated with a first version in the sequence, the one or more filenames associated with a file comprising a data manipulation language (DML) script associated with the first version; iteratively extracting a set Ai comprising zero or more filenames from metadata associated with an ith version of the relational database, the zero or more filenames each associated with a file comprising a data manipulation language script to be executed to add or modify a DML object when upgrading from version i−
1 of the relational database to version i of the relational database, where i varies incrementally from 2 to j, where the particular version is j;iteratively extracting a set Bi comprising zero or more filenames from metadata associated with an ith version of the relational database, the zero or more filenames each associated with a file comprising a DML drop script to be executed to drop a DML object when upgrading from version i−
1 of the relational database to version i of the relational database, where i varies incrementally from 2 to j, where the particular version is j; anddetermining the second set of scripts Cj by determining;
C2=[A1∪
A2]−
B2;
C3=[C2∪
A3]−
B3;
C4=[C3∪
A4]−
B4;
. . .
Cj=[Cj−
1∪
Aj]−
Bj;and generating an installation file comprising a set theory union of the first set of scripts and the second set of scripts. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A method for generating an upgrade file to upgrade version i of a relational database to version j of the relational database, where j>
- i, the method comprising;
determining a set A of data definition language (DDL) scripts that, when executed, perform creates, alters, and drops of DDL objects associated with version i of the relational database, resulting in DDL objects associated with version j of the relational database, wherein the determining a set A comprises; iteratively extracting sets Mk, each comprising zero or more filenames from metadata associated with a kth version of the relational database, where i<
k<
=j, the zero or more filenames each associated with a file comprising a data definition language script to be executed when upgrading from version k−
1 of the relational database to version k of the relational database; anddetermining the set A as the set theory union of sets Mi+1, Mi+2, . . . , Mj (A=Mi+1∪
Mi+2∪
. . . ∪
Mj);determining a set B of data manipulation language (DML) scripts that, when executed, create DML objects that are associated with version j of the relational database, but that are not associated with version i of the relational database, wherein the determining a set B comprises; determining a set E of DML scripts that when executed; perform alters DML objects associated with version i and version j of the relational database, but that differ between version i and version j of the relational database; and perform creates of DML objects that are associated with version j of the relational database but that are not associated with version i of the relational database; and determining set B as the difference between sets E and C_(B=E−
C);determining a set C of DML scripts that, when executed, modify DML objects that are associated with both version i and version j of the relational database, but that differ between version i and version j of the relational database, wherein the determining a set C comprises; determining a set E of DML scripts that when executed; perform alters of DML objects associated with version i and version j of the relational database, but that differ between version i and version j of the relational database; and perform creates of DML objects that are associated with version j of the relational database but that are not associated with version i of the relational database; determining a set Fj of DML scripts that when executed, create DML objects associated with version j of the relational database; and determining set C as a set theory intersection of set E and set Fj (C=E∩
Fj);determining a set D of DML drop scripts that, when executed, drop DML objects that are associated with version i of the relational database, but that are not associated with version j of the relational database, wherein the determining a set D comprises; determining a set E of DML scripts that when executed; perform alters of DML objects associated with version i and version j of the relational database, but that differ between version i and version j of the relational database; and perform creates of DML objects that are associated with version j of the relational database but that are not associated with version i of the relational database; iteratively determining a set Fx of DML scripts that when executed, drop DML objects associated with version x−
1 of the relational database that are not associated with version x of the relational database, where x varies incrementally from i+1 to j;determining a set G as the set theory union of sets Fi, Fi+1, Fi+2, . . . , Fj (G=Fi∪
Fi+1∪
. . . ∪
Fi+2); anddetermining set D as the difference between set G and set E_(D=G−
E); andgenerating an upgrade file comprising a set theory union of sets A, B, C, and D (A∪
B∪
C∪
D). - View Dependent Claims (11, 12)
- i, the method comprising;
Specification