Institute for Informatics
Georg-August-Universität Göttingen

Databases and Information Systems

Uni Göttingen

Semantic Web
WS 2019/20

Prof. Dr. Wolfgang May,
Lars Runge, M.Sc., Sebastian Schrage, M.Sc.

Date and Time: Tue 14-16, Wed 10-12
Room: IFI 2.101 (North Campus)
Exercises (Übung): integrated into lecture (see announcements on this page). There will be non-mandatory exercise sheets whose solutions will be discussed as parts of the lecture.
We try to use StudIP (Participants list, messages to all participants).
All materials and announcements can be found HERE on the "blue DBIS pages"
If (and as long as) non-german-speaking participants attend, the course will be given in english.

Technical Data: 6 ECTS credits (Studies in Applied Informatics).
Note: the module is by default credited as "Core Informatics". It can also be credited as "Applied Informatics". (Decision by the Dean of Studies on 25.10.2006/2.2.2010). In this case, please prepare a personal plan of studies (that e.g. connects it with your application area etc.) and ask for approval by the DoS.


  • Knowledge in First-Order Logic as taught in "Formale Systeme" is sufficient. Although, prospective participants are recommended to have participated in the lecture Deductive Databases.
  • XML: RDF/XML uses XML as representation, but requires only a little bit of knowledge about XML. A short introduction to XML from that point of view will be given in the lecture.
    XML with DTD, XPath, XQuery, XSLT and XML Schema is the topic of the lecture Semistructured Data and XML (prospectively taking place again in Summer Term 2020).

Course Description

  • Short Review: Basic Notions of First-Order Logic
  • RDF: N3 and RDF/XML format, semantics
  • SPARQL: the query language for RDF data
  • Linked Open Data (LOD): Web of Data and distributed querying.
  • The Mondial database is used as an example for RDF data.
    Mondial LOD entry point.
  • RDFS, OWL: having RDF data with additional reasoning
  • Description Logics: the logic underlying OWL
  • Practical experiments with RDF, Jena, Reasoners etc.
  • An experimental Web interface can be found for RDF+OWL and SPARQL here

Dates & Topics

  • First Meeting: Tue 22.10. 14-16: Administrativa, Overview. Slides: Introduction and Ontologies
  • Reasoning Motivation: the Einstein/Fish Puzzle ... will (again) be solved declaratively, but totally different than in the "Deductive Databases" lecture.
  • Wed 23.10.: Web Architectures, Ontologies
    Smartboard Notes
  • 29.10.: Ontologies (Cont'd)
    Smartboard Notes
  • 30.10.: ... no lecture today. Nobody was there (too cold? - this will become even worse ...).
  • 5.11. Review of first-order logic and basic notions of model theory and reasoning.
    Slides: Introduction to Logics.
    Smartboard Notes
  • 6.11.: FOL and Reasoning.
    Smartboard Notes
    A slide set on first-order logic (from the Deductive Databases lecture) can be found here. A slide set on reasoning and the FOL tableau calculus (from the DB theory lecture) can be found here.
  • "Inofficial" Exercise Sheet 0 (Tableaux)
    These (simple) exercises just review the FOL tableau calculus. Due to reasons of time, they will not be discussed at length in the lecture. Here is the [solution].
  • 12.11. Inference Systems
    Smartboard Notes
  • 13.11. RDF
    Slides: RDF
    Smartboard Notes
    Note: all example files are accessible in the RDF subdirectory of this Web page
    [ Download ]
    [ SPARQL Web Service interface ]
  • There was nobody attending the lecture on Nov 19/20. As long as this is the case, the proceeding as a "virtual lecture" is as follows:
    • I will put the topics (by sections and/or slide numbers) for each lecture with some comments on the Web page (based on the lectures of the last years).
    • I will be there at the beginning of each lecture.
    • If somebody else is there, I will give the lecture and/or answer questions on the material (the current material, and also previous and future stuff).
  • 19./20.11. Topics: RDF, SPARQL
    Exercise Sheet 1: SPARQL
  • 26.11.: SPARQL - Formal Semantics, SPARQL 1.1,
    Exercise Sheet 2: SPARQL Formal Semantics
  • 27.11.: RDF: Blank Node, Tree vs. Graph Data Models & Logic
  • 3.12.: RDFS
    Slides: RDFS
  • 4.12.: Lecture: RDFS,
    RDF/XML - shortly the main ideas. RDF/XML ist nothing conceptually new, but (if one knows XML well) mainly craft, like using URIs, and expansion of element names to URIs with namespaces, and xml:base.
    Slides: RDF/XML
  • 10.12.: Linked Open Data
    Slides: LOD
    The experimental Mondial LOD Service can be found at
  • 11.12.: Reification and Modeling/Wikidata
  • 17.12.2019: Description Logics
    Slides: DL
  • 18.12.2019 OWL
    Slides: OWL
  • 7.1./8.1.2020 OWL ...
  • Solutions to Exercise Sheets 1 (SPARQL) [solution] and 2 (SPARQL Formal Semantics) [solution]
  • 15.1./16.1.2020 OWL ...
  • 21.1.: OWL Exercise Sheet 3 (OWL)
  • 22.1.: OWL 2.0 Slides: OWL 2.0
  • ... and now you can also try to solve the Einstein/Fish Puzzle.
  • Announcement: Semantic Web Lab Course SS 2020
  • Furthermore, in SS20, there is the Lecture Semistructured Data and XML SS2020 (Advanced BSc/MSc) about XML and related things, and the Lecture Deductive Databases SS2020 (Advanced BSc/MSc) on Datalog and "intelligent" relational databases under closed-world semantics.
  • 28.1/29.1./5./6.2.2019: OWL 2.0
  • Solutions to Exercise Sheet 3 (OWL) [solution]
  • ... finally, there is also the solution to the Fishpuzzle in OWL. There are two modelings. At the beginning (10 years ago, a very old version of pellet) the short one took about 5 minutes, and the long one took 40 hours. Today, both run in some seconds, which demonstrates mainly the progress in the reasoners' internal strategy:
    • fishpuzzleLong.n3 is a very detailed and intuitive specification:
      Part 1: Specification of a row of 5 houses.
      Part 2: Specification of the properties.
      Part 3: Specification of the constraints.
    • fishpuzzleLong.sparql is the corresponding query
    • fishpuzzleShort.n3 is a shorter encoding:
      Part 1: Specification of a row of 5 houses as above.
      Part 2: tricky encoding of the properties. Instead of assigning to each house a color, a person, a brand of cigarettes, a drink, and a pet via explicit RDF edges, they are declared to be sets that are identified/mapped to each other.
      Part 3: specification of the constraints. Simpler as before, since only the equivalence classes have to be considered.
      The reasoner then has just to compute the matching (actually, this task is very similar to what StableModels does in the same situation based on clauses/disjunctions).
    • fishpuzzleShort.sparql is the corresponding query.
  • End of lectures: 7.2.2020

The SmartBoard Notes are collected here (only relevant ones, so for some dates there are no notes).

The complete slide set can be found here (including the Semantic Web Lab Course Slides). The slides of the SSD&XML lecture can also be found there. Knowledge of XML is only required so far as RDF/XML is (in addition to the N3 format) a possible representation of RDF data. One should be able to "understand" an XML document. XPath/XQuery and XSLT are not required.


  • Exam procedure: about 30-40 minutes. Candidates start with talking about a topic of their choice from the lecture (5-10 minutes), then questions+answers, including sketches on paper develops dynamically. The 5-10 minutes talk at the beginning should give me as an examiner a good impression of your knowledge, and a good starting point to assess your knowledge with further questions (usually starting with the chosen topic, and then also going to other topics from the lecture).
  • There are several slots to chose. Choose one of them. Each slot has a fixed registration/deregistration end date.
    (the main reason to have different slots is that registration and deregistration in FlexNever is only possible up to one week before the first day of exams - so having different slots makes it possible to decide later)
    • Exams between Feb. 10-March 6 (first weeks after the lectures), registration/deregistration until Feb. 3
    • Exams between March 9-April 24 (summer term lectures start on April 14, Easter weekend is April 9-13), registration/deregistration until March 2
    • Contact me by mail for the individual exam appointment in the slot of your choice ... at latest with the end of registration.

Background Literature

P. Hitzler, M. Krötzsch, S. Rudolph, Y. Sure: "Semantic Web - Grundlagen" (in German). Springer, 2008; ISBN 978-3-540-33994-6.
The (german language) book covers nearly exactly the contents of the lecture and also contains an introduction to first-order logic in the appendix.

P. Hitzler, M. Krötzsch, S. Rudolph, Y. Sure: "Foundations of Semantic Web Technologies" (in English). Chapman & Hall/CRC, 2009; ISBN: 9781420090505
The (english language) book covers nearly exactly the contents of the lecture and also contains an introduction to first-order logic in the appendix.

For the part on (first order) logic, and textbook on foundations of logic from the library (e.g. "Logik für Informatiker" (in German) von Uwe Schöning) or the manuscript "Formale Systeme" by Peter H. Schmitt (Uni Karlsruhe) (Kap. 1-5) can be used.

Some Links

Semantic Web Tools and Links

If you experience any problems (forgotten chmod, wrong paths, forgotten updates etc.), please notify us.

Web-wide Services

Professional Tools

Jena: RDF and SPARQL

Apache JENA ( ) is a free and open source Java framework for building Semantic Web and Linked Data applications.
The course uses a lightweight housemade shell interface to Jena for querying:

  • Download most recent version (incl. OWL2, partially SPARQL 1.1, based on Jena 2.10 and compatible Openllet) Nov. 2019.
  • in the CIP Pool located at /afs/
  • Experimental Web interface

  • set alias (bashrc etc.)
     alias jena='java -jar /afs/'
  • query: (if=input-files, qf=query-file, e.g. in SPARQL)
    jena -q -if inputfiles -qf queryfile
  • general options:
    -il: input language (allows RDF/XML RDF/XML-ABBREV N-TRIPLE N3 TURTLE; N3 is default)
    -if: input files
  • query options:
    -q: query
    -il, -if: as above
    -qf: query-file
  • transform options:
    -t: transform
    -ol: output format (allows RDF/XML RDF/XML-ABBREV N-TRIPLE N3-PLAIN N3-PP N3-TRIPLE N3 TURTLE; N3 is default)
  • export class tree; options:
    -e: export class tree (gives some insight for debugging an ontology ...)
    -il, -if: as above
  • reasoner options (for -q and -e):
    activate reasoning; default: internal reasoner: option -inf (for "inference")
    or use the pellet class that comes with the semweb.jar:
     jena -q -inf -qf query-filename
     jena -q -pellet -qf query-filename

Pellet - the OWL Reasoner

  • Openllet Homepage (Open Source tool based on the last freely-available version of Pellet)
  • Pellet itself has been turned into a commercial product at Stardog.

LOD: Accessing RDF Data in the Web

  • rapper: a tool that accesses a Web page in RDF-reading mode to get RDF triples: e.g.

Mondial in RDF

The Mondial database in RDF format can be found at

Call e.g.

 jena -q -qf mondial-query.sparql
 jena -pellet -q -qf mondial-meta-query.sparql

Usage in the CIP Pool

From the CIP Pool computers at the IFI (ground floor or log in from remote), the software and resources are directly accessible:

  • log in from remote to (Linux: ssh, Windows: puTTY)
  • log through to one of the individual computers (e.g. ssh c032)
  • set the alias in your .bashrc file:
     alias jena='java -jar /afs/'
  • The lecture's RDF directory with the n3 files can be found at
  • The Mondial files can be found at