-
Notifications
You must be signed in to change notification settings - Fork 0
/
B4_Queries.txt
70 lines (50 loc) · 1.76 KB
/
B4_Queries.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
1. Find all Authors.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX lab: <http://SDM_LAB3.org/>
SELECT ?authorName
WHERE
{
?author rdf:type lab:Author .
?author lab:authorName ?authorName .
}
2. Find all properties whose domain is Author.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX lab: <http://SDM_LAB3.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?propertyName
WHERE
{
?propertyName rdfs:domain lab:Author .
}
3. Find all properties whose domain is either Conference or Journal.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX lab: <http://SDM_LAB3.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?propertyName
WHERE
{
{?propertyName rdfs:domain lab:Conference}
UNION
{?propertyName rdfs:domain lab:Journal}
}
4. Find all the papers written by a given author that where published in database conferences.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX lab: <http://SDM_LAB3.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT (?pTitle as ?paper_title) (?procName as ?proceeding_name)
WHERE
{
?paper rdf:type lab:Paper ;
lab:submitted ?submittedPaper;
lab:paperTitle ?pTitle .
?author rdf:type lab:Author ;
lab:authorName "C. Groom" ;
lab:writes ?paper .
?submittedPaper rdf:type lab:SubmittedPaper ;
lab:isAs ?finalPaper .
?finalPaper lab:isPublishedInConference ?proceedings .
?proceedings lab:proceedingName ?procName ;
lab:proceedingRelatedTo ?subject.
?subject rdf:type lab:SubjectDomain .
?subject lab:keywords "Database" .
}