David R Newman

<< Back to PhD Homepage

How to Write Good OWL Ontologies

In my experience of reviewing other ontologies, reading papers on OWL and writing my own ontologies, I have found some good design practices and some really quite bad ones. Therefore, in this blog I intend to set out good design practices for OWL ontologies and why I believe these to be better than some of the practices that I have found.

Contents

Entries

<< Previous Entry | Next Entry >>

27/09/2006 Different Species of OWL

If you have been using OWL for any amount of time you will probably be aware that when it was originally defined three different species were created. These species have increasing levels of complexity, from OWL Lite through OWL DL up to OWL Full. Studies have been carried out that many ontologies that claim to be OWL happen to be OWL Full (see here). The reason that a great number of these are OWL Full rather than any other species is not because they require OWL Full to represent their complex relations but rather sufficient care wasn't taken in writing the ontology to avoid statements that would inevitably make it OWL Full.

So far this blog entry may not seem to be describing good design practice rather a design ethos but this is why I decided to make this my first blog entry. Before you start to write your ontology you really must consider the relationships you want to represent by doing this it should be easier to avoid making your ontology OWL Full unnecessarily.

From ontologies I have reviewed, I believe there is a couple of tips I can give to try and help avoid making an ontology OWL Full unnecessarily.

  1. Do not use RDF:Seq or RDF:Bag as these are not allowed in OWL DL or OWL Lite. RDF:Seq is used to represent something akin to an ordered list in HTML and RDF:Bag represents an unordered list. These two datatypes are commonly used to represent the range of a property. The MusicBrainz ontology uses both RDF:Seq and RDF:Bag to represent lists of albums, tracks, etc. RDF:Bag is easy to resolve as you can just change the list property into an individual object property, e.g. albumList becomes recordedAlbum with a range of Album rather than RDF:Bag. This means that when data is recorded several recordedAlbum relationships will be created rather than one albumList. Replacing RDF:Seq is a little more tricky as each entry in the sequence implicitly gets tagged with an order number, therefore by changing the list property to an individual object property the order will be lost. The most straightforward way round this I have found is to create a new class that encapsulates an order number as well as a reference to the individual object. This number tagging unfortunately has to be done manually making the task prone to error.
  2. Know whether you want to write an whole OWL ontology or just a group of RDF schemas. If you define your file as being an OWL ontology but then define your properties and classes as being RDFS classes and properties your ontology will not be OWL DL or OWL Lite. This does not mean you cannot use properties defined within RDFS inside your OWL ontology, in fact it is almost impossible not to. I have used the properties rdfs:label, rdfs:comment, rdfs:range, rdfs:domain, rdfs:subClassOf, rdfs:subPropertyOf and rdfs:isDefinedBy within an OWL DL ontology.
  3. The main cause of an OWL ontology not being OWL DL is using a class or property that is not defined by RDF, RDFS, OWL or the ontology itself. OWL allows you to define an owl:AnnotationProperty, so that properties from other ontologies can be used within your ontology without making it OWL Full. This is mainly used to allow properties such as dc:title, dc:description, etc but it can be used for any datatype property and it may even be possible to use it for object properties.

<< Back to PhD Homepage

Page written by David R Newman (drn[at]ecs.soton.ac.uk). Last updated June 27 2018 14:44:18.