Method and apparatus for providing schema evolution without recompilation
First Claim
1. A method for tracking versions of a plurality of data types, the method comprising the computer-implemented steps of:
- detecting creation of a new version of a data type;
generating a first schema version record for said new version of said data type, said first schema version record including format data that describes format attributes that exist in the new version of said data type; and
generating and storing first data that associates the first schema version record with a data type identifier that uniquely identifies said data type and a type identifier that uniquely identifies the first schema version record.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and apparatus that allow schema version evolution to occur without requiring applications that expect older schema versions to be recompiled is provided. According to one aspect of the invention, each application that requests data is supplied the data in the format that the application expects. To supply the data in the expected format, a mechanism is provided for tracking the evolution of data types without losing information. In addition, mechanisms are provided for determining the format expected by the application and the format in which the data is currently stored. A mechanism is also provided for converting the data from the stored format to the expected format when the two formats do not match. A data migration strategy is described in which data is gradually migrated to newer formats when the data is updated by applications that expect a more recent format than the format in which the data is currently stored.
98 Citations
27 Claims
-
1. A method for tracking versions of a plurality of data types, the method comprising the computer-implemented steps of:
-
detecting creation of a new version of a data type;
generating a first schema version record for said new version of said data type, said first schema version record including format data that describes format attributes that exist in the new version of said data type; and
generating and storing first data that associates the first schema version record with a data type identifier that uniquely identifies said data type and a type identifier that uniquely identifies the first schema version record. - View Dependent Claims (2, 3, 4, 5)
said new version of said data type includes an attribute that is a second data type, and the step of generating said first schema version record includes storing said second data type in said format data.
-
-
4. The method as recited in claim 1, wherein the first data includes second data that corresponds to a previous version of said data type and the method further comprises:
-
determining whether an attribute exists in said previous version of said data type that does not exist in said new version of said data type;
if an attribute exists in said previous version of said data type that does not exist in said new version of said data type, then performing the steps of;
generating a third schema version record for a combined version of said data type, said third schema version record including format data that describes all format attributes from both said previous version and said new version of said data type;
generating and storing third data that corresponds to said third schema version record, the third data including said data type identifier that uniquely identifies said data type; and
updating the data type identifier in said first schema version record to a value different from said data type identifier that uniquely identifies said data type.
-
-
5. The method as recited in claim 1, further comprising:
-
determining whether said data type is an embedded data type of any other of said plurality of data type, and for each other data type in which said data type is embedded, performing the steps of;
generating a new schema version record for a new version of said other data type, said new schema version record including format data that describes format attributes that exist in the new version of said data type, said attributes including attributes of said new version of said data type, and adding new data to the first data for said new schema version record.
-
-
6. A method for storing an instance that resides in volatile memory to non-volatile memory, wherein the instance is formatted according to a first format associated with a particular version of a data type, wherein said particular version is not a latest version of the data type, the method comprising the computer-implemented steps of:
-
determining whether the instance corresponds to a stored instance of data that resides on non-volatile memory;
if the instance does not correspond to a stored instance, then storing said instance on non-volatile memory according to said first format;
if the instance corresponds to a stored instance, then determining a stored version of the data type, said stored version of the data type being the version of the data type associated with the stored instance of data; and
if the stored version of the data type matches the particular version of the data type, then storing said instance to non-volatile memory according to said first format. - View Dependent Claims (7)
if the instance corresponds to a stored instance and the stored version of the data type does not match the particular version of the data type, then comparing said stored version of the data type and said particular version of the data type to determine which of said stored version of the data type and said particular version of the data type is an older version of said data type and which of said stored version of the data type and said particular version of the data type is a newer version of said data type;
if the older version of said data type does not contain any attributes that do not exist in the newer version of the data type, then storing said instance to non-volatile memory in a format that corresponds to the newer version of the data type; and
if the older version of said data type contains any attributes that do not exist in the newer version of the data type, then storing said instance to non-volatile memory in a format that corresponds to a version of the data type that includes all of the attributes of both the older version and the newer version of the data type.
-
-
8. A method for tracking versions of one or more data types, the method comprising the computer-implemented steps of:
-
detecting creation of a new version of a particular data type from the one or more data types;
determining whether an attribute exists in a previous version of the particular data type that does not exist in the new version of the particular data type; and
if an attribute exists in a previous version of the particular data type that does not exist in the new version of the particular data type, then generating a schema version record for a combined version of the particular data type that describes all format attributes from both the previous version and the new version of the particular data type, and generating and storing data that corresponds to the schema version record, the data including a data type identifier that uniquely identifies the particular data type. - View Dependent Claims (9)
-
-
10. A computer-readable medium for tracking versions of one or more data types, the computer-readable medium carrying one or more sequences of one or more instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of:
-
detect creation of a new version of a particular data type from the one or more data types;
determine whether an attribute exists in a previous version of the particular data type that does not exist in the new version of the particular data type; and
if an attribute exists in a previous version of the particular data type that does not exist in the new version of the particular data type, then generate a schema version record for a combined version of the particular data type that describes all format attributes from both the previous version and the new version of the particular data type, and generate and store data that corresponds to the schema version record, the data including a data type identifier that uniquely identifies the particular data type. - View Dependent Claims (11)
-
-
12. A computer-system for tracking versions of one or more data types, the computer system comprising:
-
one or more processors; and
a memory communicatively coupled to the one or more processors, wherein the memory includes one or more sequences of one or more instructions which, when executed by the one or more processors, cause the one or more processors to perform the steps of;
detect creation of a new version of a particular data type from the one or more data types, determine whether an attribute exists in a previous version of the particular data type that does not exist in the new version of the particular data type, and if an attribute exists in a previous version of the particular data type that does not exist in the new version of the particular data type, then generate a schema version record for a combined version of the particular data type that describes all format attributes from both the previous version and the new version of the particular data type, and generate and store data that corresponds to the schema version record, the data including a data type identifier that uniquely identifies the particular data type. - View Dependent Claims (13)
-
-
14. A computer-readable medium for tracking versions of a plurality of data types, the computer-readable medium carrying one or more sequences of one or more instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of:
-
detecting creation of a new version of a data type;
generating a first schema version record for said new version of data type, said first schema version record including format data that describes format attributes that exist in the new version of said data type; and
generating and storing first data that associates the first schema version record with a data type identifier that uniquely identifies said data type and a type identifier that uniquely identifies that the first schema version record. - View Dependent Claims (15, 16, 17, 18)
said new version of said data type includes an attribute that is a second data type, and the step of generating said first schema version record includes storing said second data type in said format data.
-
-
17. The computer-readable medium as recited in claim 14, wherein the first data includes second data that corresponds to a previous version of said data type and the computer-readable medium further comprises one or more sequences of one or more instructions which, when executed by the one or more processors, cause the one or more processors to perform the steps of:
-
determining whether an attribute exists in said previous version of said data type that does not exist in said new version of said data type;
if an attribute exists in said previous version of said data type that does not exist in said new version of said data type, then performing the steps of generating a third schema version record for a combined version of said data type, said third schema version record including format data that describes all format attributes from both said pervious version and said new version of said data type;
generating and storing third data that corresponds to said third schema version record, the third data including said data type identifier that uniquely identifies said data type; and
updating the data type identifier in said first schema version record to a value different from said data type idenifier that uniquely identifies said data type.
-
-
18. The computer-readable medium as recited in claim 14, further comprising one or more sequences of one or more instructions which, when executed by the one or more processors, cause the one or more processors to perform the steps of:
-
determining whether said data type is an embedded data type of any other of said plurality of data type, and for each other data type in which said data type is embedded, performing the steps of;
generating a new schema version record for a new version of said other data type, said new schema version record including format data that describes format attributes that exist in the new version of said data type, said attributes including attributes of said new version of said data type, and adding new data to the first data for said new schema version record.
-
-
19. A computer system for tracking version of a plurlaity of data types comprising:
-
one or more processors; and
a memory communicatively coupled to the one or more processors, the memory containing one or more sequences of one or more instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of;
detecting creation of a new version of a data type;
generating a first schema version record for said new version of said data type, said first schema version record including format data that describes format attributes that exist in the new version of said data type; and
generating and storing first data that associates the first schema version record with a data type identifier that uniquely identifies said data type and a type identifier that uniquely identifies the first schema version record. - View Dependent Claims (20, 21, 22, 23)
said new version of said data type includes an attribute that is a second data type, and the step of generating said first schema version record includes storing said second data type in said format data.
-
-
22. The computer system as recited in claim 19, wherein the first data includes second data that corresponds to a previous version of said data type and the method further comprises one or more sequences of one or more instructions which, when executed by the one or more processors, cause the one or more processors to perform the steps of:
-
determining whether an attribute exists in said previous version of said data type that does not exist in said new version of said data type;
if an attribute exists in said previous version of said data type that does not exist in said new version of said data type, then performing the steps of generating a third schema version record for a combined version of said data type, said third schema version record including format data that describes all format attributes from both said previous version and said new version of said data type;
generating and storing third data that corresponds to said third schema version record, the third data including said data type identifier that uniquely identifies said data type; and
updating the data type identifier in said first schema version record to a value different from said data type identifier that uniquely identifies said data type.
-
-
23. The computer system as recited in claim 19, wherein the memory further includes one or more sequences of one or more instructions which, when executed by the one or more processors, cause the one or more processors to perform the steps of:
-
determining whether said data type is an embedded data type of any other of said plurality of data type, and for each other data type in which said data type is embedded, performing the steps of;
generating a new schema version record for a new version of said other data type, said new schema version record including format data that describes format attributes that exist in the new version of said data type, said attributes including attributes of said new version of said data type, and adding new data to the first data for said new schema version record.
-
-
24. A computer-readable medium for storing an instance that resides in volatile memory to non-volatile memory, the computer-readable medium carrying one or more sequences of one or more instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of:
-
determining whether the instance corresponds to a stored instance of data that resides on non-volatile memory;
if the instance does not correspond to a stored instance, then storing said instance on non-volatile memory according to said first format;
if the instance corresponds to a stored instance, then determining a stored version of the data type, said stored version of the data type being the version of the data type associated with the stored instance of data; and
if the stored version of the data type matches the particular version of the data type, then storing said instance to non-volatile memory according to said first format. - View Dependent Claims (25)
if the instance corresponds to a stored instance and the stored version of the data type does not match the particular version of the data type, then comparing said stored version of the data type and said particular version of the data type to determine which of said stored version of the data type and said particular version of the data type is an older version of said data type and which of said stored version of the data type and said particular version of the data type is a newer version of said data type;
if the older version of said data type does not contain any attributes that do not exist in the newer version of the data type, then storing said instance to non-volatile memory in a format that corresponds to the newer version of the data type; and
if the older version of said data type contains any attributes that do not exist in the newer version of the data type, then storing said instance to non-volatile memory in a format that corresponds to a version of the data type that includes all of the attributes of both the older version and the newer version of the data type.
-
-
26. A computer system for storing an instance that resides in volatile memory to non-volatile memory, wherein the computer-system comprises:
-
one or more processors; and
a memory communicatively coupled to the one or more processors, wherein the memory includes one or more sequences of one or more instructions which, when executed by the one or more processors, cause the one or more processors to perform the steps of;
determining whether the instance corresponds to a stored instance of data that resides on non-volatile memory;
if the instance does not correspond to a stored instance, then storing said instance on non-volatile memory according to said first format;
if the instance corresponds to a stored instance, then determining a stored version of the data type, said stored version of the data type being the version of the data type associated with the stored instance of data; and
if the stored version of the data type matches the particular version of the data type, then storing said instance to non-volatile memory according to said first format. - View Dependent Claims (27)
if the instance corresponds to a stored instance and the stored version of the data type does not match the particular version of the data type, then comparing said stored version of the data type and said particular version of the data type to determine which of said stored version of the data type and said particular version of the data type is an older version of said data type and which of said stored version of the data type and said particular version of the data type is a newer version of said data type;
if the older version of said data type does not contain any attributes that do not exist in the newer version of the data type, then storing said instance to non-volatile memory in a format that corresponds to the newer version of the data type; and
if the older version of said data type contains any attributes that do not exist in the newer version of the data type, then storing said instance to non-volatile memory in a format that corresponds to a version of the data type that includes all of the attributes of both the older version and the newer version of the data type.
-
Specification