Implementation of backward compatible XML schema evolution in a relational database system
First Claim
1. A computer-implemented method for modifying an existing XML schema in a database without modifying existing data that conforms to the existing XML schema in the database, the method comprising:
- storing data from a set of XML documents in base database structures in a database according to an XML schema, wherein the XML schema defines an XML structure for said set of XML documents;
after storing the data from the set of XML documents in the base database structures, receiving a request to make one or more changes to the schema;
determining that the schema, if modified by the one or more changes, would be compatible with the stored data; and
wherein the step of determining that the schema, if modified by the one or more changes, would be compatible with the stored data comprises one or more of;
(a) determining that the one or more changes comprise an addition of a new element to the schema, and determining that the data stored in the base database structures in the database would be compatible with the schema as modified to add the new element;
(b) determining that the one or more changes comprise a removal of an element from the schema, and determining that the data stored in the base database structures in the database would be compatible with the schema as modified to remove the element;
or(c) determining that the one or more changes affect the ordering of elements within the schema, and determining that the data stored in the base database structures in the database would be compatible with the schema as modified to affect the ordering of elements within the schema; and
in response to determining that the schema, if modified by the one or more changes, would be compatible with the stored data, modifying the base database structures in the database to reflect the changes to the schema without modifying the data from the set of XML documents that is stored in the base database structures;
wherein the method is performed by one or more computing devices.
1 Assignment
0 Petitions
Accused Products
Abstract
In-place XML schema evolution occurs by evaluating an existing XML schema in a database system to see if it is compatible with a new XML schema. To determine if the old schema is compatible with the new schema, a lock-step traversal is performed on the two schemas. Each instruction in the old schema is compared to instructions in the new schema. Detected differences between the two schemas are evaluated to determine if existing XML documents are still compatible with the new schema. If they are, then an in-place schema evolution operation can take place. The in-place schema operation basically, involves appending the updated object information to the underlying object type and preserving the order of elements in a document by storing element mapping information on disk.
58 Citations
24 Claims
-
1. A computer-implemented method for modifying an existing XML schema in a database without modifying existing data that conforms to the existing XML schema in the database, the method comprising:
-
storing data from a set of XML documents in base database structures in a database according to an XML schema, wherein the XML schema defines an XML structure for said set of XML documents; after storing the data from the set of XML documents in the base database structures, receiving a request to make one or more changes to the schema; determining that the schema, if modified by the one or more changes, would be compatible with the stored data; and wherein the step of determining that the schema, if modified by the one or more changes, would be compatible with the stored data comprises one or more of; (a) determining that the one or more changes comprise an addition of a new element to the schema, and determining that the data stored in the base database structures in the database would be compatible with the schema as modified to add the new element; (b) determining that the one or more changes comprise a removal of an element from the schema, and determining that the data stored in the base database structures in the database would be compatible with the schema as modified to remove the element;
or(c) determining that the one or more changes affect the ordering of elements within the schema, and determining that the data stored in the base database structures in the database would be compatible with the schema as modified to affect the ordering of elements within the schema; and in response to determining that the schema, if modified by the one or more changes, would be compatible with the stored data, modifying the base database structures in the database to reflect the changes to the schema without modifying the data from the set of XML documents that is stored in the base database structures; wherein the method is performed by one or more computing devices. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 21, 22)
-
-
11. A non-transitory computer-readable storage medium storing one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to modify an existing XML schema in a database without modifying existing data that conforms to the existing XML schema in the database by performing the steps of:
-
storing data from a set of XML documents in base database structures in a database according to an XML schema, wherein the XML schema defines an XML structure for said set of XML documents; after storing the data from the set of XML documents in the base database structures, receiving a request to make one or more changes to the schema; determining that the schema, if modified by the one or more changes, would be compatible with the stored data; and wherein the step of determining that the schema, if modified by the one or more changes, would be compatible with the stored data comprises one or more of; (a) determining that the one or more changes comprise an addition of a new element to the schema, and determining that the data stored in the base database structures in the database would be compatible with the schema as modified to add the new element; (b) determining that the one or more changes comprise a removal of an element from the schema, and determining whether the data stored in the base database structures in the database would be compatible with the schema as modified to remove the element;
or(c) determining that the one or more changes affect the ordering of elements within the schema, and determining whether the data stored in the base database structures in the database would be compatible with the schema as modified to affect the ordering of elements within the schema; and in response to determining that the schema, if modified by the one or more changes, would be compatible with the stored data, modifying the base database structures in the database to reflect the changes to the schema without modifying the data from the set of XML documents that is stored in the base database structures. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20, 23, 24)
-
Specification