Abstract-Whereas ontologies are formal knowledge representations, conveying a shared understanding of a given domain, databases are a mature technology that describes specifications for the storage, retrieval, organization, and processing of data in information systems to ensure data integrity. Ontologies offer the functionality of conceptual modeling while complying with the web constraints regarding publication, querying and annotation, as well as the capacity of formality and reasoning to enable data consistency and checking. Ontologies converted to databases could exploit the maturity of database technologies, and databases converted to ontologies could utilize ontology technologies to be more used in the context of the semantic web. This work aims to propose a generic approach that enables converting a relational database into an ontology and vice versa. A tool based on this approach has been implemented as a proof of a concept.