Recently, there has been a growing need for integrating legacy relational databases with semantic web ontologies, however, experience in building such applications has revealed a gap between semantic web languages and relational data model. We present a formal mapping system to bridge the gap and study the problem of reasoning and query answering using view underlying the mapping system. Particularly, we consider a special mapping called "constraint mapping" between database integrity constraints and OWL axioms. We then propose an approach to incorporating these OWL axioms and description logic reasoning into query rewriting using views to enable the algorithm to answer more types of queries. The approach has been used to develop a pilot data integration application for neuroscience community.