09: SPARQL Advanced Flashcards
XML schema are ____ format, whereas DF, RDFS, and OWL are about ____ ____.
XML schema are message** format, whereas DF, RDFS, and OWL are about **knowledge** **representation.
Many RDF ____ ____ hold multiple ____ ____ and record information about each ____, allowing an application to make ____ that involve information from more than one ____.
Many RDF data stores** hold multiple **RDF** **graphs and record information about each graph, allowing an application to make queries that involve information from more than one graph.
A SPARQL query is executed against an ____ ____ which represents a ____ ____ ____.
A SPARQL query is executed against an RDF** **dataset** which represents a **collection** **of graphs.
A constraint, expressed by the keyword FILTER, is a ____ ____ ____ over the whole group in which the filter appears.
A constraint, expressed by the keyword FILTER, is a restriction** **on** **solutions over the whole group in which the filter appears.
Group Graph Patterns
- a group graph pattern is delimited with braces {}
Multiple Optional Patterns
- graph patterns are defined recursively
- a graph pattern may have zero or more optional graph patterns, and any part of a query pattern may have an optional part
Query patterns can involve both the ____ ____ and the ____ ____.
Query patterns can involve both the default graph and the named graphs.
What is the query to list the name of all graphs?
SELECT DISTINCT ?g {graph ?g {[] [] [].}}
Change the following SELECT command so that as well as writing the name of graphs (datasets), it writes the number of triplets in each graph as well.
SELECT ?g count(?g)
{graph ?g {[] [] [].}}
SELECT ?g count(?g)
{graph ?g {[] [] [].}}
GROUP BY ?g
When working with subqueries in SPARQL, in nested queries there is a scheme called ____ ____ ____ ____.
When working with subqueries in SPARQL, in nested queries there is a scheme called innermost** **first** **processing** **scheme.
What is the output of the following?
Federated Query
- the ability to take a query and provide solutions based on information from many different sources
Top-to-Bottom Order Approach
(Federated Queries)
- if a variable is bound above the invocation of the remote source then it is passed as a parameter
- would instead be better if the federated subquery would leave all latitude to the implementation to decide join order and would thus be more in the non-procedural spirit of SPARQL
Ideally, federating queries should be ____.
(And what is the drawback of this?)
Ideally, federating queries should be transparent.
- comes at a cost with SPARQL: multiple end points in principle can match any of the triple patterns in a query
SERVICE keyword
- instructs a federated query processor to invoke a portion of a SPARQL query against a remote SPARQL endpoint