https://www.inf.unibz.it/~calvanese/teaching/idb/
Free University of Bozen-Bolzano
Faculty of Engineering
Bachelor in Computer Science
Home page of the course
Introduction to Databases
A.Y. 2024/2025
News
Content
- Course description
- General information
- Information about the exam
- Information about the project
- For students who have to take the 8CFU exam
Official syllabus and
course description
Objectives. Students attending this course will have acquired the
techniques and methods to address problems of database design, and to make use
of the basic functionalities (definition, update, and querying of the database)
of database management systems in the context of development and deployment of
information systems. In addition, students will be able to develop applications
that programmatically interact with a database management system. The course
explicitly refers to relational databases and to the corresponding database
management systems based on the SQL language. However, the taught methods and
principles are of a more general nature, and can be applied also in those
contexts where data models and database systems different from relational ones
are adopted.
Prerequisites. Students should have a solid mathematical foundation and
be familiar with the basic programming concepts, and with basic data structures
(arrays, lists, trees) and algorithms that operate on them (visits, search,
updates). These prerequisites are covered in the following courses: Analysis,
Introduction to Programming, and Programming Project.
Attendance. Attendance is not compulsory, but non-attending students
have to contact the lecturer at the start of the course or before starting
their studies and the project work to agree on the modalities of the
independent study.
Teaching material
- Introduction to Databases (Course Slides).
Diego Calvanese, Giuseppe De Giacomo, Maurizio Lenzerini. 2021.
The slides will be made available during the course and can be downloaded
in MS Teams from the
Class Materials folder in the
2023/24 - Introduction to Databases MS Team.
- Esercises solved in class.
The exercises are assigned for the lab hours, and the solutions are
made available in the week after the lab in the same
Class Materials folder in the
2022/23 - Introduction to Databases MS Team.
- Database Management Systems (3rd edition). Raghu Ramakrishnan,
Johannes Gehrke. McGraw-Hill, 2005.
Available at University Library Bozen: 13-Textbook Collection (ST 271).
The textbook is suggested, but not strictly necessary.
- Exam Mark
The final mark is based on:
- a project [30% of mark]
(see below for more information about the
project), and
- a final written exam [70% of
mark].
The final mark is computed as a weighted average of the exam mark
(70%) and the project mark (30%).
- Written Exam
-
To be admitted to the written exam (2), the student must have discussed
the project (1), and the project must have been evaluated positively.
In other words, without having passed the project, the written
exam cannot be taken.
-
In case of a positive mark, the project mark will count for all 3
regular exam sessions of the Academic Year (i.e., if the student fails
or does not take the written exam, they keep the project mark and only
need to retake the final written exam).
-
To pass the exam, the student has to pass also the written exam (2), in
addition to the project (1).
-
At the written exam, which lasts at least 2 hours, the student will
have to carry out the design of a small database, following a given
specification. Moreover they will have to write down some SQL queries,
and possibly answer in written form some questions about the topics
covered in the course.
-
The written exam is a closed-book exam, meaning that the only allowed
resources are blank paper and pens (in addition to one's own brain, of
course). However, each student may use a single
handwritten A4 page that contains information
they consider useful for solving the exam exercises. These notes
should be personal, and not notes that one obtains from others. Note
that creating one's own notes is an integral part of the learning
process and, as such, it is way more useful than just copying someone
else's notes.
- Rules for the Project
-
The project can be developed either alone, or in a group of two.
-
When the project is developed in a group of two, the numbers given
below as upper bounds should be considered as lower bounds.
-
The project is based on the design of a simple database,
following a specification of the requirements that the
students provide on their own, and that must be discussed and
agreed upon with the lecturer/TA. As a starting point for the
discussion, the student should ideally provide an initial written
description of the application domain (the specification of the
requirements) and a draft of the ER schema that is as complete as
possible (with respect to the specification). By "draft" we intend the
schema with the entities and relationships and just the main
attributes, typically the identifiers. The diagram can be drawn by
hand and does not need to be fancy, but should be readable. Typically,
in the initial discussion and also in the initial desing phases, the
diagram gets revised, so initially it is not worth spending too much
time on the layout or graphical appearance. Alternatively, for the
discussion, the students can also present just the draft of the ER
diagram, and describe the application domain in the meeting. However,
trying to write up the specification of the application domain is a
good exercise to better understand which information the database
should store. And this specification is in any case required as part
of the project documentation.
-
Students are strongly encouraged to confirm with the lecturer/TA also
the final version of the ER diagram, before they start
working on the subsequent phases of the design of their database. They
are also encouraged to use the office hours to clarify any doubts they
might have about the various design phases. This helps to avoid that
serious problems with their design get discovered only when the project
is discussed as part of the exam. This could cause the project to be
evaluated negatively, which would prevent the student from taking the
written exam.
-
Roughly speaking, the specification of the requirements should satisfy
the following criteria:
-
It should be based on a domain containing between 6 and 10 main
conceptual entities (i.e., without counting sub-entities that
appear in ISAs or generalizations).
-
There should be some structure in the set of entities, i.e., the ER
schema should in addition contain at least one ISA and at least one
generalization.
-
There should be sufficient structure in the relationships, which
usually means that the representation of the ER schema as a graph
(where the nodes are given by the entities and relationships, and
the edges are given by the participation of entities in
relationships) should contain some cycles.
-
The schema should contain cardinality constraints on the
participation of entities to relationships that are different from
the default (0,n). In particular, there should be at least one
relationship with a cardinality (1,n) on a role.
-
The schema should contain some identifiers made of multiple
attributes, and at least one external identification for some
entity.
-
The schema should contain at least one optional attribute and at
least one multi-valued attribute.
-
There should be some external constraints, that cannot be
represented in the ER model.
-
The specification should include an indication about the volumes
for the various entities and relationships (pay attention to the
coherence between the volumes and the cardinality constraints of
the ER schema).
-
The specification should include a workload of the most common
queries and operations (between 5 and 10) that are of interest in
the modeled domain, with an indication of their frequency.
-
The student should carry out the design of the database according to
the requirements, following the methodology presented in the course,
and consisting of the following phases:
-
Conceptual design, producing the following documents:
-
structured and organized requirements;
-
glossary of terms (typically optional, but required for this
project);
-
diagram of the conceptual schema;
-
data dictionary of the conceptual schema (listing the entities,
relationships, and external constraints - the data dictionary
for the attributes can be omitted);
-
table of volumes and table of operations according to the
foreseen application load.
-
Restructuring of the conceptual schema, producing the
restructured conceptual schema (diagram and data dictionary), the
corresponding table of volumes, and the access tables to assess the
cost of the various operations.
-
Direct translation to the relational model, producing the
relational schema with external constraints and the specification
of the application load in terms of the relational schema.
-
Restructuring of the relational schema taking into account
the application load, producing the restructured relational schema
with external constraints and the specification of the application
load in terms of the restructured relational schema. The reasons
for the restructuring steps on the relational schema should be
stated explicitly, by referring to the operations and the
corresponding access tables.
-
Specification of the database in SQL, by defining relations
with suitable constraints (capturing keys, foreign keys, and tuple
constraints) and stored procedures with triggers to implement
additional constraints (inclusions, external constraints).
-
The student should also develop a simple application (typically in
Java) that implements some interaction with the database via a textual
or graphical user interface.
The application should:
-
allow the user to answer the queries that are part of the workload
(typically by instantiating some parameters with values provided as
input);
-
allow the user to perform some basic insertions and/or updates of
(some of) the data in the database, asking the user for input;
-
catch the exceptions that might be generated by JDBC due to
possible mistakes in the interaction with the database, so that the
application does not terminate prematurely with an error.
-
The documentation produced for the project should include:
-
a single pdf file containing a textual description of the
requirements (of roughly a page) and the documents for phases 1-4
above.
Remember to include at the beginning of the pdf file a
header or a title page with your name, student number, the title of
your project, and the date.
Remember also to number the pages
of the pdf file (the page numbers are important for the evaluation,
so that we can refer to them for comments);
-
one or more SQL files containing the specification of the database
(phase 5 above);
-
one or more files (typically in Java) containing the application
that interacts with the database. The functionality of the
application will be reviewed when the students discuss their
project.
-
All documents have to be bundled in a single ZIP file and have to be
uploaded to MS Teams within the "Introduction to Databases Project"
assignment.
-
The deadline for submitting the project is, unless announced otherwise,
at 23:59 two days before the day set for the discussion of the projects
(see below).
-
Rules for the Project Discussion
-
The discussion of the IDB projects typically takes place one or two
days before the date set for the written exam, and will be announced on
MS Teams before each exam session.
-
One or two days before the project discussion, we will post in MS Teams
a schedule that assigns a specific time slot to the discussion of each
project. Specifically, the discussion of the projects will be
scheduled in the order in which they have been submitted to MS Teams
(considering the last modification time), where projects submitted
first will be discussed first. The discussion of each project will
last between 15 and 30 minutes.
-
In the case of a face-to-face discussion:
-
To ease the discussion, students may bring a printout of the
following parts of the project documentation:
- the requirements,
- the conceptual schema (diagram and constraints),
- the restructured conceptual schema (diagram and constraints),
- the relational schema (with constraints) resulting from the
direct translation,
- the restuctured relational schema (with constraints).
The remaining documentation can be consulted from the pdf file, and
does not need to be printed out.
It is preferred if the sheets of paper with the documentation above
are not bound but are kept loose, since this facilitates the
assessment of the correctness of the various design phases. To
avoid confusion, please don't forget to number the pages.
-
Alternatively, we can also discuss the project by consulting on
screen the pdf file that has been handed-in on Teams.
-
Students should also bring a laptop with a functioning version of
the application they have developed for the project, so that we can
verify its funtionality during the project discussion.
-
In the case of an online discussion via MS Teams:
-
Students should be ready to share their screen on MS Teams in order
to show the different parts of the project documentation:
- the requirements,
- the conceptual schema (diagram and constraints),
- the restructured conceptual schema (diagram and constraints),
- the relational schema (with constraints) resulting from the
direct translation,
- the restuctured relational schema (with constraints).
-
In order to discuss the various phases of the development of the
database design, and illustrate how the output of one phase is used
to generate the output of the next phase, it is convenient if the
two outputs can be visualized at the same time on the screen.
Therefore, for the purpose of the discussion, each part should be
saved on a separate pdf file, so that two different parts can be
visualized on the screen at the same time (e.g., the restructured
ER schema and the relational schema resulting from the direct
translation).
-
The laptop used to connect to MS Teams should contain a functioning
version of the application they have developed for the project, so
that we can verify its funtionality during the project discussion.
For students enrolled in the old BSc in Computer Science and Engineering, who
still have to take the 8 CFU Exam for the Database Systems course, the
written exam will include also questions that cover the additional topics for 2
credit points of "Physical Data Storage" (covered in Chapter 6 of
Database System Concepts) and of "Transaction Management",
"Recovery", and "Multi-User Synchronization"
(covered in Chapters 8-10 of Database System Concepts).
The reference textbook for Chapters 6 and 8-10 is:
Database System Concepts (4th edition).
Silberschatz, Korth, Sudarshan. McGraw Hill, 2002.
Available at University Library Bozen: 13-General Collection (ST 271)
The material for Chapters 6 and 8-10 is covered at the proper level of detail
necessary for the preparation of the exam also in the slides
that Prof. Sven Helmer used when teaching the Database Systems
course until Academic Year 2017/2018. These slides are not available anymore
on the Web, but students who would like to receive an electronic copy can
contact me on Teams.
teaching page of Diego Calvanese
Last modified:
Monday, 27-Jan-2025 5:03:54 CET