Sharing and reusing the big data in relational databases in a semantic way have become a big challenge. In this paper, we propose a new approach to enable semantic web applications to access relational databases (RDBs) and their contents by semantic methods. Domain ontologies can be used to formulate RDB schema and data in order to simplify the mapping of the underlying data sources. Our method consists of two main phases: building ontology from an RDB schema and the generation of ontology instances from an RDB data automatically. In the first phase, we studied different cases of RDB schema to be mapped into ontology represented in RDF(S)-OWL, while in the second phase, the mapping rules are used to transform RDB data to ontological instances represented in RDF triples. Our approach is demonstrated with examples and validated by ontology validator.