Logische Grundlagen der Datenbanktheorie
Dozenten  Tadeusz Litak and Christoph Rauch 
Termine und Ort  See UnivIS 
Umfang  4 SWS – 7,5 ECTS 
Angaben  Vorlesung mit Übung, geeignet als Schlüsselqualifikation, für Gasthörer zugelassen, Unterrichtssprache Englisch 
Studienfächer / Studienrichtungen  WPF INFMA ab 7 (ECTSCredits: 7,5), WPF INFBAVTHI ab 4 (ECTSCredits: 7,5), WPF INFBAVTHI ab 4 (ECTSCredits: 7,5), WF MBA ab 4 (ECTSCredits: 7,5), WF MBA ab 7 (ECTSCredits: 7,5) 
Database queries are logical formulas in disguise.
Database instances are what logicians know as finite models or Herbrand models.
Is there much distinction between database theory and finite model theory then? Or at least meaningful interaction between these fields?
Come and see for yourself!
Lecture slides
Exercise Sheets
Contents
We will discuss the theoretical and logical foundations of databases, starting with the underlying data model. We will focus mostly on various flavours of the relational model (calculus vs. algebra, named vs. unnamed variant etc.) and its reallife SQL incarnation, but other models, in particular semistructured databases and their reallife XML incarnation may also get their share of attention. We will investigate the connection between databases and finite model theory and overview some most interesting results in the field. Logical issues in the design of database query languages, in particular expressive completeness, but also questions of decidability and complexity will be of particular importance. Same applies to the use of logical tools for databasetheory purposes, from EhrenfeuchtFraisse games to Herbrand structures.
Lernziele und Kompetenzen
Wissen  The students will learn basic notions and results of finite model theory, with particular attention to notions and theorems relevant for database theory and essential characteristics of expressivity, decidability and complexity. As prerequisites, we will also recall and overview basics of SQL, relational algebra, perhaps also XML query/navigation languages like XQuery and XPath 

Verstehen  The students will be able to summarize and prove major results of finite model theory and related areas relevant from the database point of view. Examples include equivalences between relational calculus and relational algebra, named and unnamed perspective, expressive completeness of relational calculus, possibly also similar results for XPath and XML query languages. The students will be able to explain the deep difference between finite and infinite model theory, by using 01 laws or by showing the failure of most preservation theorems 
Anwenden  The students will be able to use basic tools of finite model theory (and related areas relevant from a database point of view), such as EhrenfeuchtFraisse games or Herbrand structures. The students will use preservation theorems of Rosen or Rossman to characterize expressive power of logics over finite structures 
Analysieren  The students will be able to determine, e.g., whether a given SQLlike or XPathlike query is expressible over all finite models (or restricted subclasses of structures) in a chosen language 
Evaluieren (Beurteilen)  The best students, having gained a deep understanding of finite model theory, will be able to examine and evaluate choices involved in the design of basic database query languages, with particular attention to the criterion of expressive completeness and contrasting expressive power of a given language with its computational complexity 
Erschaffen  Making the right design choices is an important skill whenever the need arises for a new domainspecific language. You can think of database query languages just as an excellent case study given their omnipresence in everyday life. 
Literature

Serge Abiteboul, Richard B. Hull, Victor Vianu. Foundations of Databases. AddisonWesley, 1995.

Serge Abiteboul, Peter Buneman, Dan Suciu. Data on the Web : From Relations to Semistructured Data and XML. Morgan Kaufmann 1999

HeinzDieter Ebbinghaus, Jörg Flum, Finite Model Theory, Springer 1995

Paris C. Kanellakis. Elements of relational database theory, in Handbook of theoretical computer science (vol. B) Pages 1073 – 1156, MIT Press Cambridge, MA, USA 1990

Phokion Kolaitis. The Expressive Power of Logics on Finite Models, in Finite Model Theory and its Applications, EATCS Series: Texts in Theoretical Computer Science, Springer 2007

Leonid Libkin. Elements of Finite Model Theory, Springer 2012
————Supplementary reading on databases——————

Hector GarciaMolina, Jeffrey D. Ullman, Jennifer Widom. Database Systems: The Complete Book, PrenticeHall 2008.

Jeffrey D. Ullman, Jennifer Widom. First Course in Database Systems, Prentice Hall 2008

Raghu Ramakrishnan and Johannes Gehrke. Database Management Systems, McGrawHill 2007
———–Supplementary reading on logic and classical (unrestricted) model theory———

Herbert B. Enderton. A Mathematical Introduction to Logic (1 ed. 1972). Academic Press Second edition, 2001. ISBN 9780122384523

Wilfrid Hodges. Model theory, Cambridge University Press, Cambridge 1993, 772pp.