SPARQL is a query language for retrieving and manipulating data stored in RDF format. It allows for querying linked data graphs through operations like SELECT, DESCRIBE, ASK and CONSTRUCT. Unlike SQL, SPARQL can query data across decentralized datasets and systems as it works with globally unique identifiers rather than local schemas. Examples show how SPARQL can be used to retrieve descriptive information about a resource, select specific values from a graph, construct new triples based on pattern matching in a graph, and ask simple true/false questions against a dataset.
8. SPARQL - “DESCRIBE” Suppose The only thing you have is an Uri like this And no idea what is known about it.... http://data.esis.no/resource/projectID_111667 Simply send a SPARQL “DESCRIBE” to a sparql endpoint DESCRIBE <http://data.esis.no/resource/projectID_111667>
11. SPARQL - “SElect” ... or you know what to look for and want to select specific resources. Send a sparql “select” to a sparql endpoint PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dct: <http://purl.org/dc/terms/> PREFIX nfr: <http://data.esis.no/resource/> PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?projectID ?projectName WHERE { ?projectID a foaf:Project ; dct:title ?projectName ; nfr:orgnrResponsibleOrg <https://ws.brreg.no/lod/enhet/962392687> . }
Retorics: - where before information was locally managed, using local keys, and only accessible through customised interfaces using these “local keys” to identify information … … today this very same information is available from many different sources, represented in a standard way using globally unique identifiers … .. which are connected to each other and in such a way provide explicit key-references between different data-sets which can be used for automated harvesting and discovery
So now you think: - this is too large, too complex and too big. I cannot possible see how I can work with this and yes: I cannot see what is wrong with normal relational databases and SQL querying .. - well there is good and bad news. The good news is that it is indeed BIG, the bad news is that it is also complex and maybe even huge. … - But there is more good news: some smart people at W3C have found a way to let you use this graphs using a query language which is very similar to SQL, called SPARQL.