1. A method of generating a query implementing a schema mapping in a computing environment, said method comprising: providing a mapping M from a schema S to a schema T, said mapping M relating said schema S to said schema T, said mapping M including a plurality of constraints, said schema S and said schema T each comprising one or more elements, wherein said schema T includes at least one set type element; providing at least one nested tuple-generating dependency (nested tgd), wherein said mapping M is expressed in terms of said at least one nested tgd; and generating a query Q capable of implementing said mapping M, said implementing comprising applying said query Q to an input, said applying resulting in an output, said input being any instance I conforming to said schema S, said output being an instance J conforming to schema T, wherein said instance I and said instance J satisfy said plurality of constraints of said mapping M, and said instance J is in partitioned normal form (PNF).