Ontology is a building block of the semantic Web. Ontology building requires a detailed domain analysis, which in turn requires financial resources, intensive domain knowledge and time. Domain models in industry are frequently stored as relational database schemas in relational databases. An ontology base underlying such schemas can represent concepts and relationships that are present in the domain of discourse. However, with ever increasing demand for wider access and domain coverage, public databases are not static and their schemas evolve over time. Ontologies generated according to these databases have to change to reflect the new situation. Once a database schema is changed, these changes in the schema should also be incorporated in any ontology generated from the database. It is not possible to generate a fresh version of the ontology using the new database schema because the ontology itself may have undergone changes that need to be preserved. To tackle this problem, this paper presents a generic framework that will help to generate and synchronize ontologies with existing data sources. In particular we address the translation between ontologies and database schemas, but our proposal is also sufficiently generic to be used to generate and maintain ontologies based on XML and object oriented databases.