W3C home > Mailing lists > Public > www-rdf-logic@w3.org > March 2004

Re: about OWL

From: Benjamin Nowack <bnowack@appmosphere.com>
Date: Tue, 2 Mar 2004 12:03:29 +0100
To: Linus Yeung <cs_ykhaa@stu.ust.hk>
Cc: www-rdf-logic@w3.org
Message-ID: <PM-EH.20040302120329.70397.1.1D@>

Hello Linus,

as far as I know, OWL does not support this kind of transitivity.
You would need some kind of rule system to conclude
(?U hasDepartment ?D) AND (?D hasStudent ?S) => (?S belongsTo ?U)

I'm currently working on a similar project, which is not online 
yet (scheduled for march..), but here is the related part from
my ontology, maybe it is helpful for you:

classes (and direct properties):
- University (hasDepartment, offersCourseOfStudy)
- Department (departmentOf)
   - ComputerScienceDepartment
   - MathematicsDepartment
   - EconomicsDepartment
   - ...
- Student (enrolledAt, followsCourseOfStudy)
- CourseOfStudy (hasCourse, offeredAt, relatedDepartment)
- Course (courseOf)
- Subject

- hasDepartment (domain=University, range=Department)
- departmentOf (inverseOf hasDepartment)
- offersCourseOfStudy (domain=University, range=CourseOfStudy)
- offeredAt (inverseOf offersCourseOfStudy)
- enrolledAt (domain=Student, range=University)
- followsCourseOfStudy (domain=Student, range=CourseOfStudy)
- hasCourse (domain=CourseOfStudy, range=Course)
- courseOf (inverseOf hasCourse)
- hasSubject (domain=unionOf[CourseOfStudy, Course], range=Subject)

As cou can see, I'm relating students to universities, not 
departments. departments have some subclasses, so that I'm
able to find out things like "show me all universities that
have a CS department". With the snip above I'm trying to show
that you are almost always going to have "interesting" facts
that can not be decribed via direct binary relations (e.g.
"which universities have courses with subject CS"). In your
case it's not neccessarily an issue that you cannot relate
students to universities directly. It depends on what the
purpose of your application/ontology is. If the focus is on
relations between students and departments, you can optimize
your model by using "Department" as a domain for "hasStudent".
(with the ontology above, you can't tell directly which 
department is "responsible" for a given student)

In order to derive the "belongsTo" relationship you mentioned,
you could explicitly state that, use some rule mechanism or
use a query language to get the desired results, 
e.g. with RDQL you could do a:

SELECT ?university, ?student
WHERE (?university,  <ex:hasDepartment>,  ?d),
      (?d,           <ex:hasStudent>,     ?student)

to me, your approach seems to be fine.

(an alternative would be to use a transitive property such as
"hasMember" for both the relations between universities and 
departments, and departments and students. then you could 
use OWL's semantics to get the university of a student. but
your properties would probably be too generic for other cases
in your domain then..)

hope this helps.

Benjamin Nowack

Kruppstr. 82-100
45145 Essen, Germany

On 02.03.2004 15:09:52, Linus Yeung wrote:
>Dear Sir,
>i would like to ask how can the OWL present the following circumtances?
>Suppose we want to define an ontology,
>Class Descriptions : University, Department, Student
>Object Property: hasDepartment, hasStudent
>     hasDepartment : Domain is University and Range is Department
>     hasStudent      : Domain is Department and Range is Student
>Individual of University : HKU, UST, CHKU
>Individual of Department : CS, Math
>Individual of Student : Linus, Peter, David
>so if HKU has CS and Math Department
>       UST has CS Department
>       CHKU has Math Department
>and Peter is CS Department of HKU
>      Linus is CS Department of UST
>      David is Math Department of CHKU
>then how can we present the individuals?
>i found that i cannot present the which University is a student belonged to.
>or am i doing a right thing for the ontology?
>Best Regards
Received on Tuesday, 2 March 2004 06:07:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:27 UTC