A method for generating a schema mapping. A provided mapping M.sub.12
relates schema S.sub.1 to schema S.sub.2. A provided mapping M.sub.23
relates schema S.sub.2 to schema S.sub.3. A mapping M.sub.13 is generated
from schema S.sub.1 to schema S.sub.3 as a composition of mappings
M.sub.12 and M.sub.23. Mappings M.sub.12, M.sub.23, and M.sub.13 are each
expressed in terms of at least one second-order nested tuple-generating
dependency (SO nested tgd). Mapping M.sub.13 does not expressly recite
any element of schema S.sub.2. At least one schema of the schemas S.sub.1
and S.sub.2 may comprise at least one complex type expression nested
inside another complex type expression. Mapping M.sub.13 may define the
composition of the mappings M.sub.12 and M.sub.23 with respect to a
relationship semantics or a transformation semantics.