Ontologies proliferate with the development of the semantic Web. Most data on the Web, however, are still stored in relational databases (RDBs). Creating mappings between RDB schemas and ontologies is an effective way for establishing the interoperability between them. In this paper, we propose SMap, a semantic approach to create mappings between RDB schemas and OWL ontologies. SMap consists of two main stages: finding simple mappings and learning complex mappings. In the first stage, reverse engineering rules are applied to classify the elements in an RDB schema and an ontology correspondingly into different categories, and the virtual documents for the elements are built in terms of their categories and then matched for similarities. In the second stage, based upon the pre-found simple mappings as well as some overlapped RDB records and ontology instances, the facts used for inductive logic programming (ILP) are automatically collected, which constitute the background knowledge and positive examples. Then, different types of Horn-rule-like complex mappings are learnt with a bottom-up ILP algorithm. Experimental results on real-world datasets demonstrate that, SMap outperforms existing approaches significantly on both simple mapping finding and complex mapping learning, and such Horn-rule-like mappings are of clear semantics and can be directly used for query rewriting.