This paper first proposes a multi-agent architecture to mediate access to data sources. The mediator follows the classical approach to process user queries. However, in the background, it post-processes query results to gradually construct matchings between the export schemas and the mediated schema. The central theme of the paper is an extensional schema matching strategy based on similarity functions. The paper concludes with experimental results that assess the quality of the matching strategy.