I was looking for a SPARQL tutorial, but all I found was just queries and results – no descriptions. For example:
• Data:
<http://example.org/book/book1>
<http://purl.org/dc/elements/1.1/title>
"SPARQL Tutorial" .
• Query:
SELECT ?title
WHERE { <http://example.org/book/book1>
<http://purl.org/dc/elements/1.1/title>
?title . }
• Result:
title
"SPARQL Tutorial"
Can someone explain this example? Because in the data, I just see 2 URLs and some value. And in the query I just see select ?title, but I don’t see any title in the data and so on…
Also, in this example there is just “data”, but I thought that SPARQL works with RDF files. So can someone show me an RDF file to this example?
You have to look at the data from a different perspective. Your data is just one triple of the form (subject, predicate, object). If you look at it in just one line it might be easier to understand:
../book1is the subject,../titleis the predicate and"SPARQL Tutorial"is the object.