OWL, the Web Ontology Language has been standardized by W3C as a powerful language to represent knowledge (i.e. ontologies) on the Web. OWL has two functionalities. The first functionality is to express knowledge in an unambiguous way. This is accomplished by representing knowledge as set of concepts within a particular domain and the relationship between these concepts. If we only take into account this functionality, then the goal is very similar to that of UML or Entity-Relationship diagrams. The second functionality is to be able to draw conclusions from the knowledge that has been expressed. In other words, be able to infer implicit knowledge from the explicit knowledge. We call this reasoning and this is what distinguishes OWL from UML or other modeling languages.
OWL evolved from several proposals and became a standard in 2004. This was subsequently extended in 2008 by a second standard version, OWL 2. With OWL, you have the possibility of expressing all kinds of knowledge. The basic building blocks of an ontology are concepts (a.k.a classes) and the relationships between the classes (a.k.a properties). For example, if we were to create an ontology about a university, the classes would include Student, Professor, Courses while the properties would be isEnrolled, because a Student is enrolled in a Course, and isTaughtBy, because a Professor teaches a Course.
What can be stated in OWL?
Just as quick overview, the following could be stated in OWL:
- Teachers and Professors are the same. Therefore, these are equivalent classes (owl:equivalentClass).
- Students and and Professors are not the same. Therefore, there these classes are disjoint (owl:disjointWith)
- All Students and Professors are Academics. Therefore, the union of these classes creates a new class, Academic (owl:unionOf).
- If a Student is enrolled in a Course, then a Student also attends a Course (hopefully!). Therefore the property "is enrolled in" is a sub property of "attends" (owl:subPropertyOf). Note that the inverse does not hold: if somebody attends a course, it does not necessarily mean that they are enrolled in the course.
- If a Student is advised by a Professor, then a Professor is the advisor of a Student. Therefore the properties "is advised by" and "is the advisor of" are inverse of each other (owl:inverseOf).
- Students and Professors are also Persons (rdfs:subClassOf).
- If a Person knows another Person, then that other person must know you (right?). Therefore the "knows" property is symmetric (owl:SymmetricProperty).
There is much more that can be expressed in OWL. Actually so much that it makes the task of reasoning hard. The more you express in OWL, the harder it gets to reason (complexity is 2NEXPTIME).
The first version of OWL created a profile called OWL Lite which tried to restrict the features of OWL in order to make reasoning easier. However, the goal was not achieved. OWL 2 defines three new profiles or sub-languages that offer important advantages depending on your application scenario: OWL 2 EL, OWL 2 QL and OWL 2 RL. Given that reasoning in OWL 2 is so hard, each of these profiles tries to find a sweet spot for particular application scenarios by trading off the expressiveness (what you can express in the ontology) in order to gain the possibility of creating efficient algorithms for reasoning.
OWL 2 EL is tailored for applications that need to create ontologies with very large number of classes and/or properties. The need to model large life science ontologies motivated this profile. For example, Gene Ontology is an ontology that describes genes and gene properties with more than 25k classes while SNOMED-CT is an ontology of clinical terms with over 500k classes. With this profile, classes can be defined with complex descriptions such as defining a class in terms of the existence of something else. For example, the class Parent can be defined as somebody who has a child that is a Person.
OWL 2 RL is tailored for applications that want to describe rules in ontologies. This profile is ideal if you already have RDF data and you want to implement your business logic in rules (if/then). OWL 2 RL runs efficiently on business rule engines, such as Drools. Therefore, OWL 2 RL is basically a rule language (hence the RL).
OWL 2 QL is tailored for applications that want to reason on top of very large volumes of data. The motivation for this profile was to be able to keep data in a relational database and allow reasoning to be translated into queries on the database (hence the QL). In order for reasoning to be translated into a query, the expressivity of QL is a bit restricted. This profile can express conceptual models such as UML class diagrams and ER diagrams and also define hierarchies between classes and properties and inverse properties. One can state that every Person has a Parent but can not state that every Person has a Female Parent.
So where should you start? From wherever you want! Start creating your ontology to express the knowledge that you want and then you can validate to see in which OWL profile you are in. Otherwise, if you are already targeting a specific profile, you can learn about the exact constructs that are allowed and not allowed in each profile in the W3C specification for OWL 2 EL, OWL 2 QL and OWL 2 RL. Use can use ontology editors such as Protege or TopBraidComposer to create ontologies. In the next post, I will introduce reasoners, software tools that can infer implicit knowledge from the ontology.
About the Author
Juan Sequeda is a Ph.D student at the University of Texas at Austin and a NSF Graduate Research Fellow. His research is in the intersection of Semantic Web and Relational Databases. He co-created the Consuming Linked Data Workshop series and regularly gives talks at academic and industry semantic web conferences. Juan is an Invited Expert on the W3C RDB2RDF Working Group and an editor of the “Direct Mapping of Relational Data to RDF” specification. Juan is also the founder of a new startup, Capsenta, which is a spin-off from his research.