Exercise 1) Lets start by query example in SPARQL:
QUERY: What are the school's names that belong to the "local authority district" 00AA?
NOTE 1: "Authority districts" divide UK into different regions. The "00AA" is the code for a specific region.
ANSWER:
PREFIX sch-ont:
SELECT ?name WHERE {
?school a sch-ont:School.
?schoolsch-ont:establishmentName ?name.
?schoolsch-ont:districtAdministrative.
}
The previous code is in SPARQL. Youhave to make a JAVA application that displays the answer in the console.
Exercise 2)
QUERY: Display 10 local-authority-district codes that a school can belong to.
Exercise 3)
QUERY: Display the name of 100 schools that either belongs to local-authority-district with code 00AA or with code 00BE.
Exercise 4)
QUERY: Display the Primary schools names that exist in UK.
NOTE: A primary school has the word "Primary" in its name.
Exercise 5)
QUERY: Display the school names that exist in the town "Margate". Order them by descendent order.
NOTE: A Town is part of an Address of a School. The node school is connected to the node address by the predicate sch-ont:address. The node address is connected to the literal town using sch-ont:town as predicate.
Exercise 6)
QUERY: Display the school names AND THE TOWN NAME that exists in the town "Margate". Order them by descendent order.
HINT: take a look at SPARQL filters...