Databases (2018/2019)

Course code
Alberto Belussi
Academic sector
Language of instruction
Teaching is organised as follows:
Activity Credits Period Academic staff Timetable
Teoria 6 I semestre Alberto Belussi

Go to lesson schedule

Laboratorio 3 II semestre Roberto Posenato

Go to lesson schedule

Tecnologie per le basi di dati 3 II semestre Alberto Belussi

Go to lesson schedule

Learning outcomes

The course aims to provide the necessary skills for:
(i) the design of data according to the requirements with reference to different application contexts and within the production process of software systems;
(ii) effective and efficient management and use of data;
(iii) the use of a system for the management of relational databases in order to create, manage and query databases;
(iv) the development of applications that interact with relational databases.

At the end of the course the student must demonstrate knowledge and understanding of data models and query languages ​​that characterize systems for data management and knowledge of the fundamental mechanisms to develop applications that interact with a database; have the ability to apply the acquired knowledge and understanding skills for the design of a data collection in an effective way compared to a set of application requirements, the ability to query and efficiently use the data managed by a system, the ability to design and implement an application that interacts with a database; know how to develop the skills necessary to continue the studies independently in the field of data management systems and software solutions development.


The program is specified for each module as follows.

Module of Theory
- Introduction to database management systems (DBMS): architectures and functionalities of a DBMS. Physical and logical data independence. Data models. Concepts of model, schema and instance of a database. Languages for database systems. DBMS vs. file system.
- Conceptual database design: conceptual data models. The Entity-Relationship model (ER). Elements of the ER model: entities, attributes, relationships, ISA hierarchies and cardinality constraints.
- Logical database design: logical data models, the relational data model. Elements of the relational data models: relations and integrity constraints. Mapping between conceptual schemas in ER model and logical schema in the relational model.
- Interacting with a database system: languages for the definition, querying and update of a database. The relational algebra. Optimization of algebraic expressions. SQL: select-from-where statement, join in SQL, the GROUP BY and ORDER BY clauses, using subqueries. Views.

Teaching methods: lecturing, practicing with the teacher, didactical material (slides) and further exercises available on the eLearning platform, individual meetings during office hours according to the timetable published on the teacher web page.

Module of Lab
- Introduction to the relational database management system (RDBMS) PostgreSQL.
- Introduction to the use of SQL in PostgreSQL.
- Query Optimization.
- Introduction to the transaction.
- Introduction to Python Language.
- Database access from applications written in Java/Python.
- Introduction to Flask (Python) micro framework for developing simple database-based web applications.

Lecturing and practicing in computer laboratory, didactical material (slides) and further exercise texts are available on the eLearning platform, the teacher is available for individual meeting in office hours.

Module of Database technology
- The internal architecture of a DBMS. Transactions. Transactions properties. The concurrency control: schedules, the two-phase locking. Access methods (indexes): primary and secondary indexes, B-+tree, hashing based access methods. Query execution and optimization.
- Techniques for the interaction between a DBMS and an application.
- XML, XML schema, UML for XML data design (hints).

Teaching methods: lecturing, practicing with the teacher, didactical material (slides) and further exercises available on the eLearning platform, individual meetings during office hours according to the timetable published on the teacher web page.

Assessment methods and criteria

The exam is composed of two parts: theory and laboratory.

To pass the exam, the student must show that:
- they have understood the concepts related to the theory of relational databases and their design and implementation on database management systems
- they are able to describe the concepts in a clear and exhaustive way without digressions
- they are able to apply the acquired knowledge to solve application scenarios described by means of exercises, questions and projects.

Module of Theory and Database technology
For the modules of "Teoria" and "Tecnologie per le basi di dati" the exam consists of a written test with a duration of 2.5 hours containing: (i) an exercise about the conceptual modeling (using the E-R model) and the logical modeling (using the relational model) of a database; (ii) some exercises about the specification of queries in relational algebra on a given database; (iii) some exercises on XML and XML-Schema and some questions on the theory. On the e-learning platform in the section "TEMI D'ESAME E ALTRI ESERCIZI RIEPILOGATIVI" some tests of the previous years are published.
During the year, it is also possible to undergo the mid-term tests: these tests are fixed by the teacher in agreement with the students and are managed on the eLearning platform. These are three tests: the first test regards the design of a relational database: conceptual design (E-R model) and logic design (relational model), this weighs 4/9 of the theory grade; the second test regards the specification of queries on a relational database in relational algebra and SQL, this test weighs 3/9 of the theory grade; the third test on the program module of Databases Technologies, the latter test weighs 2/9 of the theory grade.

Module of Laboratorio
The examination consists of a written test containing 5 exercises based on the module program.
A student who obtains less than 13/30 in a written exam, will also have to take an oral examination once it has passed the written exam obtaining 18/30 at least. The final grade will be the average of two grades. The grade in this module is worth 1/4 of the grade in the course examination. A selection of previous exam tests is published at

The total grade (theory+laboratory) is given by the following weighted average: theory_grade*3/4 + laboratory_grade*1/4.

Reference books
Activity Author Title Publisher Year ISBN Note
Teoria Paolo Atzeni, Stefano Ceri, Piero Fraternali, Stefano Paraboschi, Riccardo Torlone Basi di dati (Edizione 5) McGraw Hill 2018 9788838694455
Teoria E. Baralis, A. Belussi, G. Psaila Basi di dati - Temi d'esame svolti (Edizione 1) Progetto Leonardo Società Editrice Esculapio Bologna 1999 B135655713
Laboratorio Autori Vari Flask ( Flask 2016
Laboratorio Autori Vari Manuale di Postgresql ( Postgresql