forked from SamaaKhalifa/University-Expret-System-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
queries.txt
55 lines (38 loc) · 1.05 KB
/
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
PREFIX uri: <http://www.semanticweb.org/ahmedibrahim/ontologies/2022/11/untitled-ontology-13#>
1. Get all TAs belonging to a department.
SELECT ?st ?ta
WHERE {
?st uri:DepartmentName "CS" ^^xsd:string.
?st uri:hasTA ?tmp .
?tmp uri:TAName ?ta .
}
2. Get the courses a student is currently studying.
SELECT ?st ?cou
WHERE {
?st uri:StudName "Ahmed Ibrahim" ^^xsd:string.
?st uri:study ?tmp .
?tmp uri:CourceName ?cou .
}
3. Get all the courses offered by a certain faculty.
SELECT ?fac ?cou
WHERE {
?fac uri:FacultyName "FCAI" ^^xsd:string.
?fac uri:FacultyCources ?tmp .
?tmp uri:CourceName ?cou .
}
4. Get Lecturers of a faculty.
SELECT ?fac ?dept ?lname
WHERE {
?fac uri:FacultyName "FCAI" ^^xsd:string.
?fac uri:hasDepartment ?tmp .
?tmp uri:DepartmentName ?dept.
?tmp uri:hasLecturer ?tmp2.
?tmp2 uri:LecturerName ?lname .
}
5. Get all faculties of a university.
SELECT ?uni ?fname
WHERE {
?uni uri:UniversityName "Cairo" ^^xsd:string.
?uni uri:hasFaculty ?tmp .
?tmp uri:FacultyName ?fname .
}