Sample Queries

What kind of queries can you do?

Here are some sample things that you might want to search for in the Linked Open Data environment of the Datalab.

Let's start with some simple things, we want to look for flowers:

# Flowers

PREFIX blm: <https://data.landesmuseum.de/id/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?sub ?label WHERE {
?kw ?kw_p "Blumen"@de .
?sub ?sub_p ?kw ;
rdfs:label ?label .
} LIMIT 100

And then something a bit more complex, black-and-white photographs from Freiburg:

# Black and White photo's from Freiburg

PREFIX blm: <https://data.landesmuseum.de/id/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?sub ?label WHERE {
?sub ?sub_p blm:8f74b0dd-04ee-4af5-875f-3f8da14cd1d1 ;
?p_place blm:c4a16778-ccf0-4661-a945-f438c95610c4 ;
rdfs:label ?label .
}

Further examples

These are some initial examples on doing simple SPARQL searches. With the full power of Linked Data at your dispoal, there are many more powerful complex queries that can be done.

We hope to add some more examples in this space at future workshops.