Corso di laurea magistrale in Data Science
Facoltà di Ingegneria dell'Informazione, Informatica e Statistica, Sapienza Università di Roma

Data Management for Data Science -
Homework Assignments

2021/2022

Prof. Domenico Lembo
Prof. Riccardo Rosati


Students can present homeworks during the lectures. There will be three homework assignments, which will be announced on this web page.


Assignment 1 - SQL

Choose an application domain and, using a relational DBMS, build a database. This can be done in two ways:

The work must be done by groups of two students.

Students can use publicly available DBMSs like MySQL or PostgreSQL (see below), or other, commercial DBMSs.

The queries defined by the students should comprise all the aspects of SQL queries analyzed during the course lectures and exercises (joins, aggregations, nested queries, queries with negated subqueries). The complexity of the queries produced should be (at least) comparable to the specification appearing in the following exercise on SQL.


Assignment 2 - SQL evaluation and optimization

Starting from the database developed in the first homework, every group has to identify at least 4 SQL queries that pose performance problems to the DBMS. The students have to show both the "slow" and the "fast" execution of the queries, where the fast version is obtained by:

Ideally, these queries should be picked from the queries created for the first homework; however, new queries can be considered if none of the previous queries poses performance problems to the DBMS.


GROUP REGISTRATION: Every group must send an email to both prof. Lembo and prof. Rosati no later than March 30, 2022 (strict deadline), with subject: "DMDS homework group" and containing last name and first name of every group member, the DBMS chosen, and a description of the domain of the dataset (and if possible, the link to such a dataset).


The first homework will be presented, together with the second one, in the week April 11 - April 15, 2022. The presentation of the work done wlll consist of a short (10-15 minutes) session in which the students will show the work done by directly interacting with the relational DBMS on their own laptop.


Useful links:


Assignment 3 - NoSQL

Use a NoSQL tool (property-graph database, RDF triple store, document-based database, key-value database, column-family database) to manage and query a dataset. Ideally, the groups should use the same dataset used in the first and second homework. Examples of such systems include (but are not limited to) Neo4J, GraphDB, MongoDB, Redis, Cassandra (see the course material on aggregate databases, graph and RDF databases for more details).

The work must be done by the same student groups who presented the first and second homework assignments (i.e., current project groups cannot be modified).

The presentation of the work done wlll consist of a short session (15 minutes at most) in which the students will show the work done by directly interacting with the NoSQL system on their own laptop, highlighting the differences with respect to a standard (SQL) relational database system.

The presentations of the third homework will be held during the lectures of May 23 and May 25, 2022. The order of presentations will be the same as the one for homeworks 1 and 2: so, the groups who presented HW 1 and 2 on April 11 will present HW 3 on May 23, and the groups who presented HW 1 and 2 on April 13 will present HW 3 on May 25 (a list with a more detailed presentation schedule will be published on Google Classroom).