generated from FacultadInformatica-LinkedData/Template-Curso
-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathassignment_3_afkerhousse.txt
55 lines (38 loc) · 1.45 KB
/
assignment_3_afkerhousse.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
1. Get all the properties that can be applied to instances of the Politician class
PREFIX db: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?p WHERE {
?s a db:Politician .
?s ?p ?o
}
2. Get all the properties, except rdf:type, that can be applied to instances of the Politician class
PREFIX db: <http://dbpedia.org/ontology/>
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?p WHERE {
?s a db:Politician .
?s ?p ?o .
FILTER (?p != rdf:type)
}
3. Which different values exist for the properties, except for rdf:type, applicable to the instances of Politician?
PREFIX db: <http://dbpedia.org/ontology/>
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?v WHERE {
?s a db:Politician .
?s ?p ?v .
FILTER (?p != rdf:type)
}
4. For each of these applicable properties, except for rdf:type, which different values do they take globally for all those instances?
PREFIX db: <http://dbpedia.org/ontology/>
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?p ?v WHERE {
?s a db:Politician .
?s ?p ?v
FILTER(?p !=rdf:type)
}
5. For each of these applicable properties, except for rdf:type, how many DISTINCT values do they take globally for all those instances?
PREFIX db: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?p COUNT(?v) WHERE {
?s a db:Politician .
?s ?p ?v .
FILTER (?p != rdf:type)
}