How is ontology different from database?
An ontology is different from a relational database in several ways. First, an ontology represents a data model, not a data repository. A desirable way to use an ontology is to describe an interface with it through which data may be accessed, while managing actual data instances in databases. Another difference is query; while most queries in databases retrieve the same data as stored previously, queries against ontologies infer or reason about the asserted facts and retrieve new facts implied by the known facts. Also, rules can be expressed regarding relationships between classes (entities) and subsequently these rules are applied to query processing, which generates all results matching the query according to the specified relationships.