Merging schemas to create a mediated view is a recurring problem in applications related to data interoperability. The task becomes particularly challenging when the schemas are highly heterogeneous and autonomous. Classical data integration systems rely on a mediated schema created by human experts through an intensive design process. Automatic generation of mediated schemas is still a goal to be achieved. The authors present a novel logical framework for merging multiple relational schemas related via a collection of mapping constraints in the form of tuple-generating dependencies (tgds), to address the challenge of creating a mediated query interface for data integration systems.