Re: The Two Dogs Problem

On 17 December 2010 16:38, Sandro Hawke <sandro@w3.org> wrote:
> On Fri, 2010-12-17 at 15:11 +0000, Nathan wrote:
>> Sandro Hawke wrote:
>> > Another one is to use distinguishing characteristic and then declare OWL
>> > keys [1].
>> >
>> > For practical keys, one could use (owner, order-of-acquisition) as a
>> > key.  (The dog I got first is necessarily different from the dog I got
>> > after him.)  Or you could use some kind of registration number.  In the
>> > US, some people register their dogs with akc.org; in my town, you also
>> > have to register dogs with the town each year, and you get a
>> > registration number, so (year-of-registration, town-of-registration,
>> > town-reg-number) would be a good key.   Another option for a set of
>> > characteristics that would almost always be unambiguous would be (name,
>> > date-of-birth, owner of mother).
>> >
>> > I haven't actually used keys yet in practice, so I'm not going to try to
>> > provide a working example and get it wrong.  :-)
>> >
>> > [1] http://www.w3.org/TR/owl2-primer/#Keys
>>
>> If I understand correctly, then owl:hasKey is like a unique index in
>> dbms terms, over a collection of one or more properties?
>>
>> So if you said:
>>
>>    :Dog owl:hasKey (
>>      :mother
>>      :year-of-registration
>>      :town-of-registration
>>      :town-reg-number
>>    )
>>
>> Then that asserts that any :Dog is uniquely identified (in the unique
>> existential sense) by the set of those property's values?
>>
>> Just checking I've understood this correctly, looks really useful,
>> thanks for the pointer Sandro.
>
> It looks like I spoke too soon.   As I looked more closely at the
> specs...
>
> http://www.w3.org/TR/rif-owl-rl/#HasKey_rule
> http://www.w3.org/TR/owl2-direct-semantics/#Keys
> http://www.w3.org/TR/owl2-rdf-based-semantics/#Semantic_Conditions_for_Keys
>
> ... I see this only allows you to infer equality (that two dogs are the
> same if these properties have the same values) not inequality (that two
> dogs are different).    My mistake, sorry.
>
> (And that makes sense.   Just because you don't have all four attributes
> lined up to prove they are the same, doesn't necessarily mean they are
> different.)

Thanks for all the responses, that's really helpful.

In my case, bnodes might not be ideal, im really trying to look for
the generic case, 'The N Dogs Problem'.  It's for virtual goods which
may be singular or countable.

I think I should be able to solve this using GoodRelations owns, and
possibly some other part of that vocab, will look into it.

I dont know much about OWL/OWL2 (its on my reading list) but thank for
the pointers, I'll definitely check that out.

>
>    -- Sandro
>
>
>

Received on Friday, 17 December 2010 22:41:13 UTC