Databases

Course codes: Chalmers TDA357, GU DIT620
Autumn Term 2018



GoogleGroup | LectureNotes | TimeEdit | Assignment | Fire | LastYear | PostgresTips | QueryConverter

Official URL of this page: http://www.cse.chalmers.se/edu/year/2018/course/TDA357/HT2018/

News and changes

Lectures

Material: Notes = course notes, Book = course book

The official course schema is in Time Edit. Here is a link showing only lectures.

Week 1 (5-9 November), 3 lectures: Course introduction and SQL. Notes 1,2. Book 1,6.
Introduction slides, All SQL slides
DEADLINE FOR CREATING FIRE ACCOUNTS AND REQUEST DATABASE ACCOUNT

Week 2 (12-16 November), 2 lectures: ER (Entitiy-Relationship) and the relational model. Notes 3,4. Book 2,4.
ER Slides

Week 3 (19-23 November), 1 lecture: Functional dependencies and normalization. Notes 5. Book 3.
FD Slides
Tuesday: DEADLINE FOR TASK 1

Week 4 (26-30 November), 2 lectures: SQL Constraints and triggers, Relational Algebra and Query compilation
Trigger slides, Relational algebra slides
Friday: DEADLINE FOR TASK 2

Week 5 (3-7 December), 2 lectures: JDBC, SQL-security, Transactions, authorization, indexes. Notes 8-9. Book 6,8-10
JDBC and security
Authorization and Transactions

Week 6 (10-14 December), 2 lectures: NoSQL databases, XML, JSON
Efficiency in Databases, XML, Semi-structured data
JSON, JSONSchema, JSONPath
Tuesday: DEADLINE FOR TASK 3

Week 7 (17-21 December): History of databases & repetition
Friday: FINAL DEADLINE FOR ALL TASKS

January: Exam prep
Solutions to questions we did not have time for

Description

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:

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

The full description with learning outcomes is available in the student portal

Teachers

The fastest way to get an answer is to mail the course's Google group https://groups.google.com/forum/#!forum/tda357-ht2018

Google Group

If you have any general questions regarding the course, the labs or the exercises, please ask them in our Google group. DO NOT POST ANY PART OF YOUR ASSIGNMENT SOLUTION TO THE GROUP. (link TBA) This will reach all teachers and fellow students. We have made the group public, so that you don't need to apply for membership.

https://groups.google.com/forum/#!forum/tda357-ht2018

Laboration times and supervision

See Time Edit for times and places.

Course assistants will be in the lab rooms to help.

Attendance in these classes is optional. The only exception is that every group needs to attend at least one session to get their final solution approved. Normally, each student should attend around most one supervised laboration time each week and you are expected to work with the assignments outside the lab sessions.

The sessions use an online help list. The url you use to sign up on the help list (use your name+group number) is http://www.waglys.com/lxGH8P for Johanneberg, and http://www.waglys.com/GzltnJ for Lindholmen.

Assignments

There are three assignments (a.k.a. "laborations", "labs"), written individually or in pairs. In addition, there is a "Lab 0", which consists of just registering the group.

Registration for the Fire system needs to be done in the first week of the course. Login to the fire System to see deadlines of the other tasks.

The specification ("lab PM") is here.

Reporting is done via Fire. Before reporting assignment 1, you must run your program through a test suite.

The final deadline is Friday 21 December for all returned and corrected labs. No labs will be graded if sent after this deadline.

We guarantee two gradings per lab: one for the version submitted before the ordinary deadline for that lab, the other for a resubmission before the final deadline. If your first submission is after the lab deadline, only one grading is guaranteed.

Labs are by default done in pairs:

Literature

The official course book is

Book web page

A new "international edition" was published in summer 2013. The chapters relevant to this course are the same, so either version will be OK. The book is available at Cremona and at web bookshops.

You can also use an on-line book manuscript, referred to as "notes": Databases in 131 pages. The plan is to publish these notes as a short course book later, and your feedback will be appreciated!

Exercises

There are six exercises, and each is given at two or three separate sessions; you are supposed to participate in at most one session per exercise.

See Time Edit for exact times and places.

The questions will be posted a few days before each class. The answers will be posted after each class, to encourage everyone to try the exercises themselves.

Exercise 1: SQL, solutions, Additional SQL code

Exercise 2: ER-model, solutions

Exercise 3: Functional dependencies, solutions

Exercise 4: Triggers and constraints in SQL, solutions,

Exercise 5: Relational algebra and transactions, solutions,

Exercise 6: JSON, Solutions

Exam

Written exam, usual grading scales.

Accurate date, time and location can be found in studentportalen.

The exam questions contain a standard cheatsheet, which is a reference card covering all E-R, SQL, relational algebra, and JSON syntax that is needed in the exam. Bringing your own cheat sheet is also permitted (a hand-written double-sided A4).

Exam review: TBA.

Old exams; these ones have the same format as ours, although the questions specific to XML are no longer relevant since we use JSON instead this year:

Some more old exams, not necessarily similar.

Software

PostgreSQL https://www.postgresql.org/ (the main software, used in assignments). Practical help about using Postgres can be found in these PostgresTips.

QueryConverter web application. Support for E-R diagrams, functional dependencies, normalization, and relational algebra. Source: https://github.com/GrammaticalFramework/gf-contrib/tree/master/query-converter This is experimental teaching software developed to accompany the notes.