Databases (lp3 VT20)


TDA357 / DIT621 Databases lp3 VT20 (7.5 hp)

Course is offered by the department of Computer Science and Engineering


  • 2020-03-13: The exam on 2020-03-20 will be a home exam. See the general info from Chalmers and the announcements about the Databases exam.
  • 2020-02-27. Added a page with info about the exam (with links to old exams).
  • 2020-01-23: New questions for Exercise 1.
  • 2020-01-22: Fire is open for Lab 0 submissions. We need GU student representatives, contact Thomas if you want to volunteer!
  • 2020-01-21: The schedule has been updated.
  • 2019-11-19: Started construction of this page by copying information from last time. More information will be added and some old information might be updated.

Contact details

  • Course responsible: Thomas Hallgren.
  • Teaching assistants: Alejandro Gomez, Agustín Mista, Yasmeen Emampoor, Benjamin Sannholm.
  • Student representatives: Adrian Eliasson (TKDAT), Kasper Hall (TKDAT), Carl Jendle (MPSC), Albin Johansson (TKITE), Viktor Fredholm (TKITE), Tomas Reed (GU).

All teachers and students can be reached through their Inbox in Canvas.

Course purpose

The course covers the basic principles of database systems as seen by users, application programmers and database administrators. A laboratory assignment develops these topics as a running example throughout the course. These include programming in SQL, as seen by a user querying or modifying an existing database, by a database designer, and by an application programmer invoking SQL from a host language. Course contents include:

  • Database querying and manipulation through SQL
  • Entity-Relationship modelling
  • Functional dependencies, normal forms, and relational algebra
  • Interfacing to a database from a host language (Java/JDBC)
  • Altenative data models: XML, JSON, NoSQL

The course is thus a typical first course in database systems, and occupies a traditional place in the curriculum.


First lecture: 22 January 2020 at 13:15-15:00 in HB2. Thereafter,

  • Lectures: Monday 15-17 HB2, Thursday 10-12 HB3.
  • Exercises: Wednesday 8-12, 10-12, 13-15 in EL43.
  • Labs on Monday 10-12, Thursday 8-10, Friday 13-15, usually in ED-3582 + EG 3503/4/5.

The detailed schedule with times and locations is in TimeEdit.

Lectures, exercises, deadlines (copied from last year, expect some minor changes):

22/1 Wed  Lecture 1 Introduction Notes 1, Book 1, Slides
23/1 Thu  Lecture 2 SQL 1 Notes 2, Book 2, Slides
27/1 Mon Lecture 3 SQL 2 Notes 2, Book 2, Slides
27/1 Mon Deadline 0 Group registration Fire
28/1 Wed Exercise 1 SQL Exercise1, exercise1_sol.sql
30/1 Thu Lecture 4 Entity-Relationship modelling Notes 3, Book 4, Blackboards
3/2 Mon Lecture 5 The relational data model Notes 4, Book 2, Slides
3/2 Mon Deadline 1 SQL construction and queries Lab PM
6/2 Thu Lecture 6 Functional dependencies and normal forms Notes 5, Book 3, Slides
10/2 Mon Lecture 7 SQL constraints and triggers Notes 7, Book 7, Slides
12/2 Wed Exercise 2 ER modelling Questions (Solutions)
19/2 Wed Exercise 3 Functional dependencies Questions (Solutions)
20/2 Thu Lecture 8 Alternative data models, JSON Notes 9, Book 11,12, Slides 1Slides 2
21/2 Fri Deadline 2 Database modelling Lab PM
24/2 Mon Lecture 9 Databases in software applications Notes 8, Book 9, Slides
26/2 Wed Exercise 4 Triggers and software applications Questions (Solutions)
27/2 Thu Lecture 10 Transactions, authorization, indexes Notes 6.7, 7.1, 7.4, 7.6; Book 6.6, 8.3, 10.1, Slides
29/2 Sat Deadline 3 Triggers Lab PM
2/3 Mon Lecture 11 Relational algebra and query compilation

Notes 6, Book 2,5,16, Slides

4/3 Wed Exercise 5 JSON Questions (Solutions)
5/3 Thu Lecture 12 Cancelled
9/3 Mon Lecture 13 Recap and exam preparation Quiz, exam-2019-3answers
11/3 Wed Exercise 6 Theory topics Questions (Solutions)
13/3 Fri Deadline 4 Application program (graded in lab sessions) Lab PM
20/3 Fri Exam Johanneberg 8:30-12:30 old exams


Course literature

  • Jyrki Nummenmaa and Aarne Ranta: Databases in 144 pages (free PDF), lecture notes (a book in construction).

Further reading (was the course book before):

  • Hector Garcia-Molina, Jeffrey D. Ullman, and Jennifer Widom, Database Systems: The Complete Book, Pearson Education, 2014 (1133 pages).
    Book web page. Paper copies and eBook available in the Chalmers Library.

Course design

The course has following components:

  • lectures
  • exercises
  • programming assignment ("lab")
  • supervised work in programming class ("labs")
  • course literature
  • discussion group
  • exam

Only the programming assignments and the exam are compulsory.

Changes made since the last occasion

The contents of the course is the same as last year. There will be some minor changes in the labs and the lectures to stay in sync with the lp2 HT2019 edition of the course.

Examination form

  • Written exam, individual. There is a separate page for more info about the exam.
  • Programming assignment, in groups of two, four parts.

Learning objectives and syllabus

Learning outcomes

On successful completion of the course the student will be able to:

Knowledge and understanding

  • explain the semantic meaning of queries using relational algebra
  • describe the effects of transactions and indexes in a relational database

Competence and skills

  • construct an Entity-Relationship diagram for a given domain
  • translate an Entity-Relationship diagram into a relational database schema
  • apply design theory concepts for relational databases such as functional dependencies and normalization
  • retrieve and modify data using a database language for respective task
  • design a database interface using constraints, views, triggers and privileges
  • implement a relational database schema and related interface using a data definition language
  • communicate with a database, through a database interface, from a software application

Judgement and approach

  • evaluate and create different models for a database domain using EntityRelationship diagrams and relational schemas
  • contrast different data models, such as the relational and the semi-structured data models

Course plans

GU course plan.

Chalmers course plan.


Course summary:

Date Details Due