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
DL (Descriptive Logic)
- family of knowledge representation languages on which OWL is based
- allows humans and computers to exchange well-structured ontologies
- facilitates logical deduction to infer additional knowledge, a process referred to as reasoning
- balances expressivity vs complexity of reasoning
What two important issues can DL reasoners help reveal?
- inconsistencies & misclassifications
- hidden dependencies
Main Characteristics of DL
- modes the binary relationships among the entities of certain domains
- can use knowledge in ontology to infer further facts about individuals
- can form statements linking concepts and roles (by existential and universal restrictions)
What 3 elements is DL involved with?
- individuals/constants (e.g. David)
- concepts/unary relations (e.g. Person)
- roles/binary relations (e.g. isMarried)
TBox
- defines the ontology that serves as conceptual view over the data in the ABox terminology

ABox
- set of assertions that
- state membership of individuals to concepts
- C(a)
- and role membership for pairs
- R(a,b)
- state membership of individuals to concepts
State the following statement in DL as well as in Protege:
Assume that for a person to be called a student, he/she needs to attend at least 4 courses.
