SELECT-ing and then DESCRIBE-ing

Hi,

How does one consistently retrieve a result table (SELECT result) with
some resources *and* the graph of those same resources (DESCRIBE
result)?

I see two options:

A) This is what we currently use

1. Executing SELECT, e.g.

SELECT ?resource
{
    ?resource ?p ?o .
}
ORDER BY ?resource

2. Wrapping the SELECT into DESCRIBE and executing it

DESCRIBE *
{
    {
        SELECT ?resource
        {
            ?resource ?p ?o .
        }
        ORDER BY ?resource
    }
}

B)

1. Executing SELECT

SELECT ?resource
{
    ?resource ?p ?o .
}

2. Using the resource URIs from the result to form a DESCRIBE and executing it

DESCRIBE ?resource
WHERE
  { ?resource  ?p  ?o }
VALUES ?resource { <http://result/resource1> <http://result/resource1>
... <http://result/resourceN> }


Here are the questions I have:
1. Are these approaches equivalent?
2. Is it correct that using approach A) we can expect the A.2 graph to
be about those resources that were in the A.1 table only if ORDER BY
is specified? I.e. explicit ordering is required to make it stable.
3. Are there other standard approaches?

Thanks.

Martynas
atomgraph.com

Received on Saturday, 31 October 2020 14:10:27 UTC