SPARQL Flashcards

(14 cards)

1
Q

What are the main RDF syntax formats?

A

RDF/XML; N-Triples; Turtle; JSON-LD.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is N-Triples format?

A

Line-based: each line is a subject predicate object . triple.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Name two Turtle shortcuts.

A

Reuse subjects with semicolons; comma-separated object lists.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does JSON-LD provide?

A

Represents RDF graphs as JSON objects for JSON integration.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you declare a prefix in Turtle/SPARQL?

A

Use @prefix prefix: <namespaceIRI> .</namespaceIRI>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the basic structure of a SPARQL SELECT query?

A

SELECT ?vars WHERE { triple patterns }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a triple pattern in SPARQL?

A

A pattern with subject, predicate, object (variables or terms) to match triples.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a SPARQL binding?

A

A mapping of query variables to RDF terms for each match.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you match multiple variables in SPARQL?

A

Include multiple patterns in WHERE; project each variable in SELECT.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is variable chaining in SPARQL queries?

A

Link patterns via shared variables to traverse relationships.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the FILTER clause used for?

A

Restricts solutions by a boolean expression or regex.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does the UNION clause do?

A

Performs logical OR between pattern groups.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the OPTIONAL clause used for?

A

Attempts a pattern; if absent, returns NULL for its variables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you query a SPARQL endpoint?

A

Load the graph into a SPARQL server and run SELECT queries.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly