Abstract: A method for implementing a virtual ontology over a relational database, comprising: defining a virtual ontology from multiple candidates for a relational database by: declaring a hierarchy of virtual entities; for each virtual entity, declaring a mapping associating the virtual entity with at least a subset of a physical table in the database; storing the virtual entity in association with the mapping in a metadata database; and defining multiple schemas, each implemented as a different relational view of the virtual ontology and capturing at least one ontology capability, wherein querying the metadata database with a first relational query targeting one of the schemas enables writing a second relational query, wherein executing the second relational query at the relational database extracts knowledge that is opaque to the relational schema and expresses the ontology capability captured by the targeted ontology schema, thereby extracting the knowledge within a relational framework.