Patent ID: 7689581

Claim:
A method for generating a schema mapping, said method comprising: providing a mapping M 12 from a schema S 1 to a schema S 2 , said mapping M 12 relating the schema S 2 to the schema S 1 , said schema S 1 and schema S 2 each comprising one or more elements, said mapping M 12 being expressed in terms of at least one second-order nested tuple-generating dependency (SO nested tgd); providing a mapping M 23 from the schema S 2 to the schema S 3 , said mapping M 23 relating the schema S 3 to the schema S 2 , said schema S 3 comprising one or more elements, said mapping M 23 being expressed in terms of at least one SO nested tgd; and generating, by a processor of a computer system, a mapping M 13 from the schema S 1 to the schema S 3 , said mapping M 13 relating the schema S 3 to the schema S 1 , said mapping M 13 being expressed in terms of at least one SO nested tgd that does not expressly recite any element of the schema S 2 , said generating the mapping M 13 comprising generating the mapping M 13 as a composition of the mappings M 12 and M 23 ,wherein at least one schema of the schemas S 1 and S 2 comprises at least one complex type expression nested inside another complex type expression, wherein said generating the mapping M 13 as a composition of the mappings M 12 and M 23 comprises: Skolemizing each SO nested tgd of the mapping M 12 ; computing a rule R E for each element E in the schema S 2 that is of set type, wherein the rule R E describes how data instances of the element E can be created based on the Skolemized SO target tgds that are relevant for the element E, and wherein R 12 is a rule set denoting the set of all of said rules R E and replacing all references to the schema S 2 in the mapping M 23 with references to the schema S 1 using the rule set R 12 , wherein said replacing all references to the schema S 2 in the mapping M 23 converts the mapping M 23 to the mapping M 13 .