Building Semantic Mappings from Databases to Ontologies