Reasoning with Ontologies in Databases