One of the objectives of the Medoc system is transparent searching in heterogeneous distributed bibliographic and full text databases (information providers). For a sufficiently large number of information providers and automatic method for provider selection becomes necessary. We take a decision-theoretic approach: we estimate the cost for retrieving n relevant documents from each provider, then choose the combination which minimizes total costs. The main cost factor is the total number of relevant documents in each database; additional factors are the retrieval quality of the database, the costs for retrieving a document from the database, and the user-specific costs for retrieving a non-relevant or a relevant document, respectively. In this paper, we also describe a first implementation of this approach where each factor is made explicit so that the implementation can easily be adapted for specific situations.