Saad
Saad

Reputation: 374

How to express "a-part-of" relationship in OWL ontology language?

How to represent a "part-of" SQL relationship in OWL ontology language? For example:

CREATE TABLE DevelopmentTask (
 DevelopmentTaskID INT,
 SoftwareProjectID INT FOREIGN KEY REFERENCES SoftwareProject (SoftwareProjectID),PRIMARY KEY(DevelopmentTaskID, SoftwareProjectID))

In the above table the DevelopmentTask table is part of the SoftwareProject. How I can represent this in OWL, may be it can be represented using intersectionOf property in OWL.

Thanks,

Upvotes: 0

Views: 2338

Answers (3)

Aziz Alto
Aziz Alto

Reputation: 20291

First, some theory

OWL doesn't provide built-in primitives for defining part-whole relations (as explained in the W3C Working Draft).

However, you can represent part-of (and any other non is-a) relations using OWL's objectProperties and their restrictions.

So, in your case you want to define the concept DevelopmentTask as part of the concept SoftwareProject.

In this case, you need to:

  1. create an owl:Class for each concept (2 classes in this example).
  2. create an owl:ObjectProperty to represent the relation partOf and its restrictions.
  3. extend the part class to be a subClassOf of a restriction over values from the whole class on that property.

Second, the RDF/XML syntax

So to express that as an OWL ontology in RDF/XML syntax, the final layout would look like this:

<owl:Class rdf:about="SoftwareProject"/>

<owl:ObjectProperty rdf:about="partOf"/>

<owl:Class rdf:about="DevelopmentTask">
  <rdfs:subClassOf>
    <owl:Restriction>
      <owl:onProperty rdf:resource="partOf"/>
      <owl:someValuesFrom rdf:resource="SoftwareProject"/>
    </owl:Restriction>
  </rdfs:subClassOf>
</owl:Class>

Upvotes: 3

Joshua Taylor
Joshua Taylor

Reputation: 85813

As another answer mentioned, you can simply create a property hasDevelopmentTask, or something similar. If you are going to make things a bit more complex in the future (e.g., if a software project has a development task, and a development task a (sub-)development task…) you might want to take a look at the W3C Working Draft, Simple part-whole relations in OWL Ontologies.

Upvotes: 3

Artemis
Artemis

Reputation: 3301

You can simply introduce an ObjectProperty or a DataTypeProperty depending on what exactly you need to display. For example, I would introduce:

hasDevelopmentTask

And then add the following restriction:

SoftwareProject hasDevelopmentTask some DevelopmentTask

The "some" restriction also depends on your relation. If it is 1-n this relation holds, otherwise replace it with "min", "max", "exactly", or "only".

Also, since your example contains IDs, I would add them as instances or individuals of either SoftwareProject or DevelopmentTask. In this case, every instance of SoftwareProject will have "some" DevelopmentTask.

Upvotes: 4

Related Questions