Re: SPARQL to check if a specific URI exists

2017-05-16 Thread Laurent Rucquoy
Thank you for these clarifications.

Laurent


On 16 May 2017 at 07:58, Lorenz B. 
wrote:

> It depends on the definition of "existence" in an RDF graph. What if the
> URI resp. resource only occurs in the object position of a triple? Then
> you'd need something like this:
>
> ASK WHERE {
> { ?p ?o . }
> UNION
> {?s ?p  .  }
> }
> > Hello,
> >
> > I want to write a SPARQL query to attest the existence of a specific URI
> in
> > a TDB.
> >
> > Is the following query the right way to do this (considering notably the
> > execution performances with big volumes) ?
> >
> > ASK WHERE {
> >  ?p ?o .
> > }
> >
> > Thank you in advance for your help,
> >
> > Laurent
> >
> --
> Lorenz Bühmann
> AKSW group, University of Leipzig
> Group: http://aksw.org - semantic web research center
>
>


Re: SPARQL to check if a specific URI exists

2017-05-15 Thread Lorenz B.
It depends on the definition of "existence" in an RDF graph. What if the
URI resp. resource only occurs in the object position of a triple? Then
you'd need something like this:

ASK WHERE {
{ ?p ?o . }
UNION
{?s ?p  .  }
}
> Hello,
>
> I want to write a SPARQL query to attest the existence of a specific URI in
> a TDB.
>
> Is the following query the right way to do this (considering notably the
> execution performances with big volumes) ?
>
> ASK WHERE {
>  ?p ?o .
> }
>
> Thank you in advance for your help,
>
> Laurent
>
-- 
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center



SPARQL to check if a specific URI exists

2017-05-15 Thread Laurent Rucquoy
Hello,

I want to write a SPARQL query to attest the existence of a specific URI in
a TDB.

Is the following query the right way to do this (considering notably the
execution performances with big volumes) ?

ASK WHERE {
 ?p ?o .
}

Thank you in advance for your help,

Laurent