Assignment 2: RDF and SPARQL

Assignment 2: RDF and SPARQL
Course Schedule
Lecturer
Position
John
Full
Professor
Arthur
Assistant
Professor
Peter
Associate
Professor
Alice
Assistant
Professor
Course
Math
Student
Undergraduate
Web
Graduate
Engineering
Information
Graduate
Science
Library
Graduate
Management
Time
Monday
Wednesday
Friday
Monday
Exercise 1 – RDF Schema (20 points)
Create a RDF Schema for the table above
Exercise 2 – RDF (20 points)
Create a RDF for the table above based on the defined RDFs. The RDF Schema
is stored in http://www.example.com/teach.rdfs.
Exercise 3 – RDF Triple (20 points)
Convert the RDF file above into RDF Triples and draw the corresponding RDF
Graph
Exercise 4 – Sparql and Jena (20 points)
For the above RDF document, write SPARQL queries for the followings and
use Jena ARQ to answer it
(1) Find all assistant professors
(2) Find all lecturers who teache on Monday?
(3) Find assistant professors who teach Graduate?
(4) Find who teach graduate and on which day?
(5) Find courses on Monday
Exercise 5 – Merge RDF Graph (20 points)
Merge two RDF Graphs and write the corresponding RDF file and RDF
Triples, Show the merged RDF Graph.
http://www.example.com/food.ht
ml
dc:creator
http://www.people.com/887788
foaf:name
foaf:homepage
http://www.people.com/887766
Hans Peter
foaf:name
foaf:knows
John Smith
http://www.people.com/887788
http://www.hans.com/