Nowadays, the majority of data sources in the current web are stored in Relational Data Bases (RDB), the semantic web main idea is to solve the problem of sharing and reusing information between applications and companies in different common areas, based on data stored in RDBs. This article present a complete automatic approach that generate Ontology from a giving relational database based on a set of rules that extract semantics from RDB and transform it to OWL file. Our approach treat most complicated relationship types and constraints like simple and multiple inheritance, transitive chain, disjoint, completeness constraint and N-ary relations. From other side, our solution deals also with mapping data at the same time, think that make this solution more powerful, complete and effective. Our approach composed of four processing stages, analysis, extraction, mapping and finally a verification step before generating the OWL file.