Introduction To Databases

Introduction To Databases

General Informations


  • Announcements are posted on the Teaching Portal (Portale della Didattica)
  • All discussions about the course can be opened on Piazza.


TypeDay of the weekTimeClassroom
LectureMonday13:00-16:00Room R1
LectureWednesday8:30-11:30Room R4


  • Introduction to the course (pdf)
  • Introduction to databases (pdf)
  • Relational data model and relational algebra
    • Relational data model (pdf)
    • Relational algebra (pdf)
  • SQL language
    • Introduction (pdf)
    • The SELECT statement (pdf)
    • Nested queries (pdf)
    • Set operators (pdf)
    • Update commands (pdf)
    • Managing tables (pdf)
  • SQL language: other definitions
    • Management of views (pdf)
    • Transactions (pdf)
    • SQL for applications (pdf)
    • Access control (pdf)
    • Index management (pdf)
  • Triggers
  • Database design
    • Design techniques and models (Part 1) (pdf)
    • Design techniques and models (Part 2) (pdf)
    • Conceptual design (pdf)
      • Time representation (pdf)
    • Logical design (Part 1) (pdf)
    • Logical design (Part 2) (pdf)
      • Logical design example (pdf)
    • Normalization (pdf)
  • Web programming
    • Client-server architectures (pdf)
    • The HTML language (pdf)
    • Cascading Style Sheet (pdf)
    • Web applications with Python and Flask (pdf)
    • SQLAlchemy (pdf)


Additional materials will be published here.

Relational algebra exercises (and SQL) – part 1pdfSolution
Relational algebra exercises – part 2pdfSolution
SQL – part 2pdfSolution
SQL – part 3pdfSolution
SQL – part 4pdfSolution
SQL – part 5pdfSolution
Trigger: RankingpdfSolution
Trigger: Eventpdf
Trigger: ScholarshippdfSolution
ER: AirQpdfSolution
ER – Cooking schoolpdfSolution
ER – Beauty farmpdfSolution
ER – BankpdfSolution


The laboratory practices will begin on Friday, April 1st.

Groups are divided by the surname initials.

Student GroupDay of the weekTimeClassroom
Team A: ABD-KAMFriday8.30-10.00LAIB1
Team B: KAR-ZONFriday10.00-11.30LAIB1
Software and installation guides
  • Installation guides, to work on the lab practices you can use oracle directly on your PC or online through Oracle APEX. We suggest you to use the online option, following the guide below:
Practical sessions schedule

The schedule of the Practical sessions may be subject to variation. In this case, students will receive timely communication during the lessons. Materials for each session will be published in the corresponding week.

DateText and solutionsAdditional content
Practice #1April 1SQL queries on an Oracle database (Part 1)DB creation script
Practice #2April 22SQL queries on an Oracle database (Part 2)
Practice #3April 29Database design and SQL queries on an Oracle/MySQL database
Practice #4May 13SQL and triggersSQL scripts
Practice #5May 27Web applications with FlaskSQL scripts
Practice #6June 3
Practice #7June 10


ArgumentTextDue dateSolution
Homework 1Relational AlgebraHW 1 Text9/4/2022PDF
Homework 2SQL QueriesHW 2 Text15/5/2022PDF
Homework 3Web applicationsHW 3 Text07/06/2022
Homework 4Database DesignHW 4 Text05/06/2022PDF


To obtain the points associated with the home assignments, students must observe the following terms:

  • Complete all the points of the exercises in the homework text.
  • Prepare a file in PDF, DOC or ODT format with the solution of the homework.
  • Name the file as HomeworkN_Surname_Name_StudentId.EXT, whereStudentId, Surname and Name should be replaced with student information
    • N: the character following Homework should be replaced with the number of the submitted homework (e.g., ‘1’ for homework no. 1)
    • EXT: you can choose for the submission either PDF, DOC or ODT file formats (DOCX format is not supported).
    • Since uploaded files are automatically processed, naming the file with a wrong name implies the cancellation of the related homework submission.
  • Load the file on the didactic portal (Portale della didattica) in the section Work Submission (Elaborati) before the deadline. Multiple loadings for the same student and/or for the same homework are not allowed.
    • The upload date shown on the didactic portal is considered for the evaluation.
    • Since uploaded files are automatically processed, the upload after the deadline implies the cancellation of the related homework submission.
  • During the upload procedure a description (“Descrizione”) field is required. Insert the same name given to the uploaded file (according to the rules described above).
  • Only for students with no access to the course page on the didactic portal, the homework may be submitted before the deadline by sending an email to the assistant lecturer.
  • Discuss the homework with a positive evaluation on the fixed date (announcement will be published).


All the students on the list, separately for each homework, will receive the associated extra points for the exam.

Past Exams

The texts of the past exams will be shown here.