Header

Search

Database Lab/Datenbankpraktikum - Exercises

Exercises

  1. conceptual design (17.9.2025)
  2. logical design (24.9.2025)
  3. Consistency constraints (1.10.2025)
  4. Queries
    1. Exercises (8./15.10.2025)
    2. No lab on October 22 and 29 - use time for query exercises and self-studies!
    3. Performance (05.11.2025)
  5. Transactions (12.11.2025)
  6. Views (19.11.2025)
  7. User-defined functions and stored procedures (26.11.2025)
  8. Trigger (03.12.2025)
  9. Extensions and Security (10.12.2025)
  10. final presentations and closing (17.12.2025)

Student presentations are usually in the week following their topic

Exercises, solutions, and other material will be published in OLAT.

Conceptual Design

The first exercise is to develop a conceptual model representing the entities of a carsharing organization. A German description of the system is here and an English translation here.

Logical Design

In the second lesson, we map the conceptual design onto a logical design. In addition to mapping entity types and relationships, please pay particular attention to the following cases:

  • how to implement specialization hierarchies;
  • how to deal with attributes whose type is again structured (such as addresses);
  • how to implement static attributes;
  • how to handle domains (and whether to use them at all);
  • how to handle collection-valued types (such as extras in Vehicle).

The Postgres manual about DDL can be found here (sections 5.1 and 5.10). In particular, read the section on inheritance. For the syntax definition how to create types and tables, see here and here.

Constraints

Define primary key, foreign key, uniqueness, not null, and semantic(check) constraints for the logical schema (see previous topic). See here for the relevant parts in the manual.

Quicklinks and available languages

Subpages of Übungen / Exercises