Logische Grundlagen der Datenbanktheorie

Last offering: WS 2016/17. Starting in 2019, this course evolves into Introduction to Finite Model Theory.


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!


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 real-life SQL incarnation, but other models, in particular semistructured databases and their real-life 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 database-theory purposes, from Ehrenfeucht-Fraisse 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 0-1 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 Ehrenfeucht-Fraisse 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 SQL-like or XPath-like 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 domain-specific language. You can think of database query languages just as an excellent case study given their omnipresence in everyday life.


  • Serge Abiteboul, Richard B. Hull, Victor Vianu. Foundations of Databases. Addison-Wesley, 1995.
  • Serge Abiteboul, Peter Buneman, Dan Suciu. Data on the Web : From Relations to Semistructured Data and XML. Morgan Kaufmann 1999
  • Heinz-Dieter 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 Garcia-Molina, Jeffrey D. Ullman, Jennifer Widom. Database Systems: The Complete Book, Prentice-Hall 2008.
  • Jeffrey D. Ullman, Jennifer Widom. First Course in Database Systems, Prentice Hall 2008
  • Raghu Ramakrishnan and Johannes Gehrke. Database Management Systems, McGraw-Hill 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 978-0-12-238452-3
  • Wilfrid Hodges. Model theory, Cambridge University Press, Cambridge 1993, 772pp.