“Now, miraculously, we have the Web. For the documents in our lives, everything is simple and smooth. But for data, we are still pre-Web.” (Tim Berners-Lee, Business Model for the Semantic Web) The successful use and re-use, search, and operation of data, depends on the effective definition, use and management of metadata. The first part of this thesis considers the issues related to learning metadata, which are the nuts and bolts of any application in the field of e-learning. More precisely we investigate learning metadata issues in the context of a “local” open learning repository (OLR for short). Thereby, we stress the pedagogical background in handling metadata, discussing metadata standards, and structuring learning materials. We demonstrate, inter alia, the lack of addressing learning processes and instructional theories in the learning object metadata standard (LOM). Then, we propose an extension of LOM based on the introduction of an abstraction layer and the notion of instructional roles. We also structure several courses based on different instructional models. Our open learning repositories can be considered as a framework and a testbed where metadata modeling languages, learning metadata standards, and metadata management are presented and discussed within an interdisciplinary team. In the second part, we generalize the learning metadata issues, particularly metadata management, to issues related to the broadly used metadata that annotate any resource on the Web. We also expand the metadata management from the local environment of open learning repositories to the distributed environment of peerto-peer networks. The open learning repositories play then the role of special peers, themetadata providers , in the P2P network. Unfortunately, although quite a few database techniques can be re-used in the P2P context, P2P metadata management infrastructures pose additional challenges caused by the open and dynamic nature of these networks. The main task here is to enable an efficient dynamic distributed query processing. For this purpose, we briefly present our super-peer based topology and schema-aware distributed routing indices extended with suitable statistics. Then, we show how these indices facilitate the distribution and dynamic expansion of query plans. After that, we propose a set of transformation rules to optimize query plans and discuss different optimization strategies in detail. In addition to the optimization of complex distributed query processing, we also investigate semantic caching strategies for P2P networks, in order to optimize the query response time and reduce the network load.