Course syllabus

TDA357/DIT621 Databases VT19 (7,5hp)

Department of Computer Science and Engineering, Chalmers and University of Gothenburg

Revised 23 January 2019

Google group Lab PM  TimeEdit Fire Lecture Notes Query Converter

(Lecture Notes: version 2019-03-10 almost the final one for this course; some edits may be done in the JSON sections)


2019-08-30: Now available: August exam questions and model solutions.

2019-03-28: Exam review: new date Wednesday 17 April at 10-12, in EDIT 6106.

2019-03-28: Now available: exam questions and model solutions

2019-03-12: The Standard cheat sheet is now in its final shape. So are the lecture notes, as regards this course (although there is obviously a lot to do before they can be published as a book). Sections marked with * in the lecture notes will not be assumed in our exam.

2019-03-11: recap exam questions, answers, and Kahoot quiz: see links in the lecture schema below

2019-03-08: extra lab session Thursday 14 March 10-12. Purpose: demoing Lab 4. It is strongly recommended that you don't leave your demo to Friday, but use this extra opportunity instead. The lab will be direct continuation of the 8-10 lab, in the same place.

2019-03-07: Standard cheat sheet, preliminary version (to be finalized by 11 March). This is included as an appendix in the exam questions. You can also take your own cheat sheet, hand-written A4, text on both sides.

2019-02-28: LabPM now updated with the Haskell version of Lab 4.

2019-02-25: Lab 4 is now possible to do also in Haskell: see here. The old spec for Java in the Lab PM is still a valid alternative.

2019-02-04: Course representatives: Nellie Edvardsson, Elin Eriksson, Viktor Franzén, Claudia March Piris. They will organize the course evaluation, and you can also contact them if you have any issues about the course. (Unfortunately, we cannot publish their email addresses on this page.)

2019-01-29: Lab 1 deadline moved to 6 February


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: 23 January 2018 at 13:15-15:00 in HB2


  • lectures Monday 15-17 HB2, Thursday 10-12 HB3; last lecture 11 March, none 14 February
  • exercises Wednesday 10-12, 13-15 in EL43 (notice: we don't use the 8-10 time)
  • labs on Monday 10-12, Thursday 8-10, Friday 13-15 in ED-3507

The detailed schema with times and locations is in TimeEdit

Lectures, exercises, deadlines:

23/1 Wed:  Lecture 1 Introduction Notes 1, Book 1
24/1Thu  Lecture 2 SQL 1 Notes 2, Book 2
28/1Mon Lecture 3 SQL 2 Notes 2, Book 2
29/1 Tue Deadline 0 Group registration Fire
30/1 Wed Exercise 1 SQL

Questions Solutions_pdf


31/1 Thu Lecture 4 Entity-Relationship modelling Notes 3, Book 4
4/2 Mon Lecture 5 The relational data model Notes 4, Book 2
6/2 Wed Deadline 1 SQL construction and queries Lab PM
7/2 Thu Lecture 6 Functional dependencies and normal forms (Jyrki) Notes 5, Book 3
11/2 Mon Lecture 7 Relational algebra and query compilation (Thomas)

Notes 6, Book 2,5,16, Slides

13/2 Wed Exercise 2 ER modelling Questions Solutions
16/2 Sat Deadline 2 Database modelling Lab PM
20/2 Wed Exercise 3 Functional dependencies Questions
21/2 Thu Lecture 8 SQL constraints and triggers Notes 7, Book 7, Slides
25/2 Mon Lecture 9 Databases in software applications (Thomas and Aarne) Notes 8, Book 9, Slides
27/2 Wed Exercise 4 Triggers and software applications Questions
28/2 Thu Lecture 10 Transactions, authorization, indexes Notes 7.7, 7.9, 8.7, 6.7; Book 6,8,10
2/3 Sat Deadline 3 Triggers Lab PM
4/3 Mon Lecture 11 Alternative data models, JSON (Matthías) Notes 9, Book 11,12, Slides
6/3 Wed Exercise 5 Theory topics Questions Solutions
7/3 Thu Lecture 12 Cassandra NoSQL (Johan Buratti, Spotify)
11/3 Mon Lecture 13 Recap and exam preparation exam-2018-3 answers quiz
13/3 Wed Exercise 6 JSON Questions Solutions
15/3 Fri Deadline 4 Application program (graded in lab sessions) Lab PM
22/3 Fri Exam Johanneberg 8:30-12:30 old exams



Contact details


Course literature

Lecture notes (a book in construction):

Jyrki Nummenmaa and Aarne Ranta, Databases in 131 pages, manuscript, available here

Further reading (was the course book before):

  • Hector Garcia-Molina, Jeffrey D. Ullman, and Jennifer Widom, Database Systems: The Complete Book, 2/E, Pearson Education, 2008.

Book web page 


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

Webpage in Canvas

Official course book changed to the emerging lecture notes book

Last programming assignment generalized from Java to other choices of implementation language

XML replaced by JSON


Examination form

Written exam, individual

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: up to date

Chalmers course plan: will be updated to the same content as GU's


Course summary:

Date Details Due