Re: D2RQ and Revelytix semantics

Juan,

On 27 Jul 2010, at 02:00, Juan Sequeda wrote:
>> D2RQ is *mostly* database-instance-only. If one uses an auto- 
>> generated
>> mapping, one can optionally enable the generation of class and  
>> property
>> definitions for the auto-generated class/property URIs. When the  
>> mapping
>> author customizes the mapping and replaces the auto-generated URIs  
>> with URIs
>> from shared vocabularies/ontologies, then these definitions are no  
>> longer
>> needed.
>
> So this is where I think we need to clarify. AFAICT, ClassMap and
> PropertyMap does the following
>
> ClassMap: x -> Class
> PropertyMap: y -> Property (where it can be a datatype or object  
> property)

Here's an example D2RQ ClassMap that maps to a shared vocabulary:

     map:UserClassMap a d2rq:ClassMap;
         d2rq:uriPattern "http://example.com/user/@@USER.ID@@";
         d2rq:class foaf:Person;
         .

This means: The output RDF graph contains an RDF triple of the shape

     <http://example.com/user/XXX> a foaf:Person .

for each distinct value in the USER.ID column, where XXX is replaced  
with the respective value of USER.ID. That's all.

> The database-instance-only mapping does not declare a class or  
> property at
> all.

What do you mean by "declaring" a class or property? You don't  
"declare" classes and properties in RDF, RDFS or OWL, the notion  
doesn't exist anywhere in the specs, so it's perhaps better to avoid  
the word "declare" here.

Note that in the RDF Semantics [1],

     ?s ?p ?o .

implies

     ?p a rdf:Property .

and

     ?s a ?o .

imples

     ?o a rdfs:Class .

So, *every* RDF statement "declares" a property, and *every* rdf:type  
statement "declares" a class, because the use of a URI in the  
predicate position, or as an rdf:type, implicitly makes that URI a  
property or class, respectively.

The difference between your "instance-only" and "instance-plus-schema"  
approaches is wether *additional* RDFS/OWL statements about the  
property/class, beyond the implicit typing as a property/class, are  
generated. Such as domain/range/quantity and the like.

Note that in the case of a mapping to shared vocabularies such as  
FOAF, your "instance-plus-schema" approach would generate statements  
about foaf:Person that contradict the FOAF spec, which is highly  
undesirable.

> For example, Triplify outputs triples without defining that something
> is a class or something else is a property in the mapping language  
> (SQL).

This is not true, see above. The triples generated by Triplify imply  
that certain URIs are classes and properties, thanks to RDF Semantics.

Best,
Richard

[1] http://www.w3.org/TR/rdf-mt/


>
> However, a class and property definition does appear in
> the database-instance-and-schema mapping.
>
>
>>
>>
>> There is no way to formally prove this because both
>>> languages don't have existing defined semantics (right?)
>>>
>>
>> The semantics of the D2RQ language is defined by the  
>> implementation, and
>> documented in the manual ;-)
>>
>> If you talk about *formally* defined semantics, you're right it  
>> doesn't
>> have it.
>
>
> Yes, I meant, that the semantics aren't formally defined.
>
>>
>>
>> - Revelytix language has different ways of saying the same thing  
>> for sake
>>> of
>>> query optimization ( right?). (I personally believe this is  
>>> something we
>>> should avoid. Language and implementation details should be  
>>> separate...
>>> just
>>> look at SQL)
>>>
>>
>> In D2RQ there are a number of instances where one can say the same  
>> thing in
>> different ways. This is mostly for author convenience -- syntactic  
>> sugar.
>>
>
> Yes, we definitely need to have syntactic sugar, but I think (IMO)  
> that
> different syntaxes shouldn't imply issues in implementation
>
>>
>> Best,
>> Richard
>>
>>
>>
>>
>>
>>> Looking forward to Alex's presentation tomorrow!
>>>
>>>
>>> [1]
>>>
>>> http://www.w3.org/2001/sw/rdb2rdf/wiki/Database-Instance-Only_and_Database-Instances-and-Schema_Mapping
>>>
>>> Juan Sequeda
>>> +1-575-SEQ-UEDA
>>> www.juansequeda.com
>>>
>>
>>

Received on Tuesday, 27 July 2010 11:38:40 UTC