Re: [External] : example showing why rdf:state is essential

Hi James,

>> 1) Two-property example:
>>
>> # mapping from relational data: one-to-one, using RDF1.2-supported "asserted under id" tuples (that use the rdf:asserts property)
>> :stint1 rdf:asserts <<( :Bob :workedFor :A )>> ; :start 1980 ; :end 1990 .
>> :stint2 rdf:asserts <<( :Bob :workedFor :B )>> ; :start 1990 ; :end 2000 .
>> :stint3 rdf:asserts <<( :Bob :workedFor :A )>> ; :start 2000 ; :end 2010 .
>>
>> # adding some unreliable info using RDF1.2-supported "reified under id" tuple (that use the rdf:reifies property)
>> :stint4 rdf:reifies <<( :Bob :workedFor :B )>> ; :start 2010 ; :end 2020 .
> under this proposal, what would be the result of the following sparql query

> select (count (?for) as ?count)
> where { :Bob :workedFor ?for }

> were it applied to a graph which included those four statements?

The result will be [ ?count = 0 ]. This is because no s-p-o triple was loaded and due to the "no side-effect" principle of this approach, no such s-p-o triple was automatically generated. In general, asserted id-s-p-o tuples do not have the side-effect of generating the corresponding s-p-o triples.

Here are some related variations of the above query that will produce different results:
- select (count(?for) as ?count) where { ?id rdf:asserts <<( :Bob :workedFor ?for )>> } .
    RESULT: [ ?count = 3 ]
- select (count(?for) as ?count) where { ?id rdf:reifies <<( :Bob :workedFor ?for )>> } .
    RESULT: [ ?count = 1 ]
- select (count(?for) as ?count) where { ?id ?p <<( :Bob :workedFor ?for )>> . FILTER( ?p IN (rdf:asserts, rdf:reifies) ) } .
    RESULT: [ ?count = 4 ]

Thanks,
Souri.

________________________________
From: James Anderson <anderson.james.1955@gmail.com>
Sent: Friday, August 16, 2024 8:43 PM
To: RDF-star Working Group <public-rdf-star-wg@w3.org>
Subject: Re: [External] : example showing why rdf:state is essential

good morning;

> On 16. Aug 2024, at 23:15, Souripriya Das <souripriya.das@oracle.com> wrote:
>
> ...
>
> 1) Two-property example:
>
> # mapping from relational data: one-to-one, using RDF1.2-supported "asserted under id" tuples (that use the rdf:asserts property)
> :stint1 rdf:asserts <<( :Bob :workedFor :A )>> ; :start 1980 ; :end 1990 .
> :stint2 rdf:asserts <<( :Bob :workedFor :B )>> ; :start 1990 ; :end 2000 .
> :stint3 rdf:asserts <<( :Bob :workedFor :A )>> ; :start 2000 ; :end 2010 .
>
> # adding some unreliable info using RDF1.2-supported "reified under id" tuple (that use the rdf:reifies property)
> :stint4 rdf:reifies <<( :Bob :workedFor :B )>> ; :start 2010 ; :end 2020 .

under this proposal, what would be the result of the following sparql query

select (count (?for) as ?count)
where { :Bob :workedFor ?for }

were it applied to a graph which included those four statements?

---
james anderson | james@dydra.com | https://urldefense.com/v3/__https://dydra.com__;!!ACWV5N9M2RV99hQ!O59l_7OCGsyoa5ODrrwqZX8bOZsd3C4m0i87102jVP-7bTsuGnmqQhuZQZcTSaaEL0KpjNh47UVAcjmNyOqSRn9IwmfNyA$

Received on Saturday, 17 August 2024 03:53:28 UTC