Method and apparatus for providing schema evolution without...

Data processing: database and file management or data structures – Database design – Data structure types

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C707S793000, C707S793000

Reexamination Certificate

active

06216137

ABSTRACT:

ATTRIBUTE OF THE INVENTION
The present invention relates to migrating data between different versions of the same data structures, and more specifically, to a method and apparatus for migrating data to the format expected by an application without recompiling the application.
BACKGROUND OF THE INVENTION
Most software packages are almost constantly evolving. During the evolution of a software package, the software is revised to add new features and to increase the efficiency of old features. Often, a revision to a software package will involve a revision to the data types that are manipulated by the software package. As a software package evolves, numerous versions may be created for the same data type. For example, a first version of a software package may be designed to operate on data that is formatted according to a first version of a data type, while a second version of the same software package is designed to operate on data that is formatted according to a second version of the data type.
All of the versions of a particular data type are referred to as a “schema”. A particular version of a data type is referred to as a “schema version”. The process of moving from one version of a schema to another version of the schema is referred to as schema evolution. The format of a data type may be modified in a variety of ways during the schema evolution process. For example, new attributes may be added to a data type, existing attributes may be removed from a data type, and the type of data contained in particular attributes may be changed. The structure (e.g. the set of attributes and type of attributes) of a schema version is referred to as the “format” of the schema version.
Computer applications store the data they create according to certain formats, and expect the data that they access to be presented to them according to those same formats. The data formats that a computer application expects to encounter is typically determined by the versions of the schemas used at the time that the computer application is compiled. Thus, if a computer application that operates on a data type, type1, is compiled based on version 5 of type1, the computer application will expect the data it accesses to be presented according to the format of version 5 of type1.
Data created by a software package designed for an earlier schema version must be accessible to software packages designed to operate on later versions of the schema. In addition, data created by a software package designed for a newer schema version must be accessible to software packages designed to operate on earlier versions of the schema. Consequently, two problem situations may arise: (1) an application expects an older version than the version stored on disk, and (2) an application expects a newer version than the version stored on disk.
One approach to solve the problem of making the old data available to new versions of software is to perform a batch conversion on the data using a format conversion tool. During the batch conversion process, the format conversion tool reads data that is stored according to the format of the old schema version (the “old format”) and stores the data according to the format of the new schema version (the “new format”).
However, the batch conversion approach is not suitable for certain computing environments. For example, depending on the amount of data to be converted, the conversion process may make the data unavailable for a long period of time. Therefore, in computing environments where data must constantly be available, the batch conversion approach will not work.
In addition, batch conversion only exacerbates the problem associated with using applications that expect older versions of data. Once a batch conversion process is completed, all of the data will be stored according to the revised formats. As a result, versions of the software that use the older versions of the data types can no longer be used. To continue to use such software, the software must be recompiled based on the new versions of the data types. Thus, the batch conversion approach is not suitable for environments where some users may continue to access the data with software that expects the data to be presented according to old formats.
Schema evolution addresses both of the problem situations described above. One approach to supporting schema evolution is to maintain type definition information that specifies the latest format of all data types and to require all software to always use the latest format. During the schema conversion process, the type definition information is updated to reflect the formats of the new versions of the schemas. According to this approach, all software that will access the data must be designed to inspect the type definition information before accessing the data in order to know how to access the data. To avoid conflicts, the type definition information for any given schema cannot be modified while any process is currently accessing data associated with the given schema. Conversely, all processes will be blocked from accessing data associated with a particular schema while any data associated with the schema is being converted to a new format.
Based on the foregoing, it is clearly desirable to provide a method and apparatus for allowing schema evolution to occur without making the underlying data inaccessible during a conversion period. It is further desirable to provide a method and apparatus that allows software to access data even when the format of the data is based on a different schema version than the schema version supported and expected by the software.
SUMMARY OF THE INVENTION
A method and apparatus that allow schema evolution to occur without requiring applications that expect older schemas to be recompiled is provided. Data required by an application may be currently stored on any type of storage device, including dynamic or static memory devices. 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, 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.
According to another aspect of the invention, a mechanism is provided for tracking the evolution of data types. A schema record is constructed for each new version of each data type. The new schema record is associated with the existing schema record for the previous version of the data type. Each schema record includes format data that describes all of the properties of the particular version of the data type for which the schema record was created, including all of the attributes of any embedded objects. When a new version of a given data type is created, new versions of all data types that embed the given data type are also created. When a new version of a data type does not include all of the attributes of the previous version, then a combined version of the data type is created that includes all of the attributes of both the new version and the previous version.
According to another aspect of the invention, the expected and stored formats of data are determined by first determining the schema version expected by an application and the schema version in which the data is stored. The expected version is determined by inspecting a type version table that is created by the application upon initialization. The type version table of an application is a table that stores all types used by the application and identifies the versions expected by the application for each of the types. The stored version is determined by inspecting stored version information stored with the data. Once the expected and stored versions are identified, the expected and stored formats may be determined by reading the format data stored in the schema records that correspond to the expected and stored versions.


REFERE

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Method and apparatus for providing schema evolution without... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Method and apparatus for providing schema evolution without..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method and apparatus for providing schema evolution without... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2477075

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.