Coming from the Biological Sciences, Ontology is a word that represents a really easy idea, but is defined with other less-commonly used words.
a formal representation of the knowledge by a set of concepts within a domain and the relationships between those concepts
- A representation of knowledge, or a "model"
- A domain, or "a topic"
- A set of concepts, or "things in the domain"
- A set of relationships between concepts
So, in computer science terms, it's a graph, where the nodes correspond to things which are all part of the same topic, are annotated with topic-related data, and are connected to other nodes with relationship annotated edges.
As it is a model that doesn't fit into relational databases well, if you intend to store an Ontology you might want to use a graph database, or one of the popular relational database graph storage techniques.
The primary reason Ontologizes haven't overtaken relational databasees in all aspects is because relational databases provide a simple, even if less flexible, means of connecting two items, the foreign-key. While this key doesn't permit a lot of annotation to describe the relationship, it does limit the number of approaches to data structuring, preventing people from creating every kind of relationship (which thankfully means limiting the number of wasteful relationships).
For example, in a "family tree" database based on Ontologies
- The domain is one family's tree
- The model is the individuals and their relationships within the family tree.
- The concepts are the people in the family.
- The relationships would be the edges indicating "mother", "father", "bother", "sister", etc.
Note that now comes the tricky part. You have "mother" and "father", but what about "parent"? If you omit "parent" your lookup logic is more complex, so let's include a new relationshiop "parent", which means a "mother" of a person now has two links, "mother" and "parent" (as does the father).
What about "grandparent"? Again, doing it logically leaves some of the information out of the database, but storing it increases the overhead of maintaining the database.
"uncle", "aunt", "in-law", "father-in-law", etc. all add in one new relationship, and the power behind Ontologies is that you are not constrained as to the kinds of relationships you wish to add; however, the difficulties lie in knowing which relationships directly impact the solution (and the general lack of performance if you don't store the relationships directly, as you need to do multiple database lookups to find a "composed relationship").