Describing relational data sources by means of ontologies constitutes the foundation of most of the semantic based approaches to data access and integration. In this work we introduce an automatic procedure for building ontologies starting from the integrity constraints present in the relational sources. The use of a conceptual model to describe relational data sources has been proved to be extremely useful to overcome many important data access problems. However, the task of wrapping relational data sources by means of ontology is mainly done manually. In this work we introduce an automatic procedure for extracting a conceptual view from a relational database. In order to represent the extracted ontology we adopt a variant of the DLR-Lite description logic because of its ability to express the mostly used modelling constraints, and its nice computational properties. The connection with the relational data sources is captured by means of sound views. Moreover, the adoption of this formal language enables us to prove that the extracted ontologies preserve the semantics of the integrity constraints in the relational sources. Therefore, there is no data loss.