Flavors of OWL

Flavors of OWL

Introduction

In OWL 101 we gave an introduction to OWL at a high level. Confusingly, there isn't just one OWL standard. Instead, there are different flavors of OWL—each a distinct subset of the full OWL standard—that are simpler and, in some cases, much more computationally efficient for reasoning than the full standard.

Fortunately, regardless of which flavor you work with, they are all OWL (e.g. any ontology written using any subset of OWL features is still valid OWL and should be consumable by most OWL tools).

This lesson will briefly look at those flavors (or more formally, "profiles") and discuss when you might want to use one or the other.

Note that this is a fairly technical lesson.

Prerequisites

Objectives

Today's Lesson

OWL might be used in two very different ways:

  1. As a powerful data modeling language (ontologies of use).
  2. As a way to inject automatic reasoning abilities (ontologies of meaning).

The different flavors of OWL will only really matter to you if you're using OWL to do automated reasoning. The reason for this (pun intended), is these different flavors of OWL exist purely to allow you to trade-off more expressive modeling power against the more time-consuming computational requirements of the automated reasoning.

Said again:

Different flavors of OWL trade-off expressive modeling power for computational efficiency when performing reasoning.

If you're not using OWL for automated reasoning at all, then there is no trade off to consider; you can simply use the most expressive profile, OWL 2 / Full, to say whatever you like without regard to the worst case reasoning performance.

OWL Profile Philosophy

Before we dive into the official OWL profiles, it's worth calling out a general guideline of how to think about them.

In essence, each flavor of OWL corresponds to a specific usage model. In most cases, it should be very clear which flavor is the most appropriate.

OWL 2 / Full

The profile known as OWL 2 / Full allows you to use every construct available within OWL 2.

OWL 2 / Full is by far the most expressive of the profiles. And if you are unconcerned with reasoning performance (perhaps because you aren't using an automated reasoner at all), then this is what you want.

If you are using an automated reasoner, however, then you'd better be careful. OWL 2 / Full defines a series of inference rules that are so complex that, in the best case, might run really slowly on today's computers. In the worst case, it is possible to describe inferences using OWL 2 / Full that cannot be completed at all using any computer.

Said another way, reasoning over OWL 2 / Full is undecidable.

Thus if you're using an automated reasoner, and you don't want it to run forever and/or give incomplete results, then you're better off restricting yourself to a more limited profile.

OWL 2 / EL

Aside from OWL 2 / Full, OWL 2 / EL is the most expressive profile we will consider. It is useful in cases where you have a fairly large number of classes and properties that are linked together through somewhat complicated relationships, and you want to use automated reasoner to draw out further relationships for you.

If you restrict yourself to OWL 2 / EL, then all these relationships between classes can be inferred fairly quickly, as can questions about which instances are members of which classes. (Here, "quickly" means polynomial time, for details see http://www.w3.org/TR/owl-profiles/#Computational_Properties).

For more details on OWL 2 / EL, see http://www.w3.org/TR/2009/REC-owl2-profiles-20091027/#OWL_2_EL, and http://www.w3.org/TR/2009/REC-owl2-primer-20091027/#OWL_2_EL.

OWL 2 / QL

Whereas as OWL 2 / EL is geared toward a large number of intricately related classes and properties, OWL 2 / QL is geared toward efficiently processing a large amount of instance data.

For example, suppose that you have a database full of instances, and you also have an ontology written in OWL 2 / QL. Although OWL 2 / QL is still quite powerful, it is sufficiently limited that a query written in OWL 2 / QL can be fully rewritten as a SQL query.

 

Because of this, OWL 2 / QL will often be the flavor to use for cases where you have large amounts of instance data that sit in a more or less traditional relational database.

Note: we'll even show you how to expose data in a relational database via a SPARQL endpoint in an upcoming, hands-on tutorial.

For more information on OWL 2 / QL, see http://www.w3.org/TR/2009/REC-owl2-profiles-20091027/#OWL_2_QL, and http://www.w3.org/TR/2009/REC-owl2-primer-20091027/#OWL_2_QL

OWL 2 / RL

Just as OWL 2 / QL is geared toward running efficiently on top of a relational database, OWL 2 / RL is geared toward running efficiently on traditional business rules engine. If your application depends on a rules engine, this is the best flavor of OWL to use.

Specifically, it works best for data that has already been massaged into RDF and plays well with any rules that might be used to implement arbitrary business logic.

For more information on OWL 2 / RL, see http://www.w3.org/TR/2009/REC-owl2-profiles-20091027/#OWL_2_RL and http://www.w3.org/TR/2009/REC-owl2-primer-20091027/#OWL_2_RL

Earlier Versions

The above flavors of OWL are defined as part of the spec for OWL 2. The previous version of OWL back from 2004 defined a slightly different group of profiles: OWL/Lite, OWL/DL, and OWL/Full.

Since these older profiles have now been superceded by OWL2 / EL, OWL2 / QL, and OWL2 / RL, we will not say much about them. The older subsets of OWL 1 are merely mentioned here since you are very likely to see references to them on outdated pages on the Web.

Conclusion

The choice of OWL flavor very much comes to down to your application:

  • If you need to reason efficiently over intricately related classes and properties, use OWL 2 / EL.
  • If you have a large amount of instance data and you primarily just want to query it efficiently using some moderately complex class relationships, use OWL 2 / QL.
  • If you have more complicated class relationships and are building on a typical business rules engine, use OWL 2 / RL.

In the real world, most vendors may only partially implement a given profile and may include just a few features from other profiles or even provide their own custom reasoning to boot. It pays to read the manual carefully.

However, if you're not using a reasoner at all and are only concerned with modeling your data, simply use OWL 2 / Full.

Next lesson: OWL Reference for Humans