Re: question on domain

Johnson, Matthew C. (LNG-ALB) wrote:
> Hello,
> 
>  
> 
> First, I hope this is the correct group for this.  
> 
You got it!
>  
> 
> Based on my understanding, one can define a property and then specify 
> the domain for that property which is the list of classes in which that 
> property is allowed.  

Not quite.  As several other responders have noted, specifying the 
domain doesn't *disallow* use of the property with instances of other 
classes.  What it does is license inferences about what classes your 
instance is also a member of, based on the domain declaration.  You are 
free to disregard those inferences if you don't think they are 
appropriate.

However, one cannot define a class and specify
> (from the class’s point of view) which properties are applicable to that 
> class.  The specification of which properties are applicable to a class 
> is from the property’s point of view.  If this is correct, it seems to 
> reduce the ability for someone else to re-use my properties within their 
> own classes (without asking me to update the domain on my properties).  
> It seems backwards. 
> 

It's true that if you have domains specified for a property, reuse of 
that property for other purposes may be somewhat more complicated (e.g., 
you may have to disregard the extra inferences that "aren't appropriate" 
in the new use).  However:

a.  this doesn't seem to be a "reduced ability" compared to the OO 
approach, in which you can't really reuse *any* properties (e.g., the 
"hasName property for a Person and for a Pet are separate properties).

b.  you can choose to not specify domains (and ranges) for properties 
you believe may be reused, and do your constraint-checking in some other 
way.

c.  you can use OWL property restrictions, that at least allow you to 
specify property constraints that are local to classes.  See, e.g., 
Section 3.4 of the OWL Guide.

>  
> 
> Let’s assume that person X creates a property “hasName” and specifies 
> the domain to include the class “Person”.  Later, person Y creates the 
> class “Pet” and everyone involved (including person X) agrees that 
> “hasName” is applicable to both people and pets.  If all this occurs 
> within one organization, it is not terrible to change the schema for 
> “hasName” to include “Pet” in its domain.  But this would not be 
> possible in web at large.
> 

I take your point, but you can still change the schema (at least you 
could *ask*) in the Web at large (at least, *I* expect Web schemas to 
evolve, just like any other kind of schema).  Also, in some of these 
cases, it might be debated whether you really want to use the exact same 
property (remember these are really URIs, not just text property names) 
in all these cases.  For example, even though I know there's a Person 
named "Prince" (how about "Fido" or "Spot"?), I might want to have 
distinct properties for Person names and Pet names (OWL property 
restrictions would handle this particular case nicely too).

In any event, RDF is a different model, and involves different mappings 
from "the reality" you want to model to expressions in the model.  In 
this it is no different from OO modeling techniques.

>  
> 
> I am looking at this from an object oriented perspective where I would 
> define a class and then list the attributes/properties of that class.  
> In other words, properties cannot exist by themselves.  Perhaps that is 
> where I am going astray or perhaps I am missing a nuance of RDF.
> 

In RDF, properties *can* exist by themselves.  Some of the differences 
between RDF and conventional OO modeling are discussed in Section 5.3 of 
the RDF Primer.  There's also "A Semantic Web Primer for Object-Oriented 
Software Developers" at http://www.w3.org/TR/sw-oosd-primer/.  These 
documents, plus the OWL documents mentioned earlier, may be helpful.

>  
> 
> I appreciate any comments on this.  It has seemed like a “silly” 
> question to me for some time…but is also one that has bothered me.
> 

It's not silly.  RDF is a different approach in some respects from OO 
models, and it's understandable that questions can arise about this. 
Recognizing this was part of the reason why some of the material I've 
pointed to was produced in the first place.

--Frank

Received on Friday, 21 April 2006 13:47:07 UTC