- Foundations of Computer Science
- Summary
Course Syllabus
Obiettivi
Al termine del corso lo studente sarà in grado di interrogare e di inferire la struttura implicita della base di dati a partire dalle tabelle che la compongono.
Inoltre lo studente saprà scrivere e correggere gli errori di semplici programmi in Python per la gestione e l'analisi di dataset formati da poche tabelle interconnesse, come quelle disponibili a kaggle.com (formati CSV, TSV, JSON). In particolare, le analisi verranno fatte utilizzando il Jupyter Notebook.
Infine, lo studente potrà interrogare database relazionali usando SQL, sia come linguaggio separato, sia come chiamata in un programma Python.
Conoscenza e capacità di comprensione:
Questo insegnamento fornisce le conoscenze basilari e capacità di comprensione relativamente a:
- Database.
- SQL
- Programmazione in Python
- Notebook Jupyter
- Gestione di dati tabellari con Pandas
Capacità di applicare conoscenza e comprensione
Alla fine dell'insegnamento gli studenti saranno in grado di:
- Scrivere interrogazioni in SQL
- Scrivere notebook in Python per gestire dataset
- Scrivere notebook in Python per analizzare e pulire dataset
Autonomia di giudizio
Gli studenti saranno in grado di comprendere autonomamente la qualità dei dati da gestire ed effettuare un'analisi esplorativa usano un notebook Jupyter
Abilità comunicative
Gli studenti saranno in grado di descrivere i processi decisionali che li hanno portati a analizzare e pulire un dataset.
Capacità di apprendere
Gli studenti saranno in grado di apprendere nuovi linguaggi di programmazioni dedicati all'analisi statistica, in particolare R.
Contenuti sintetici
Organizzazione di dati grezzi: file system, file con delimitatori.
Introduzione ai database. Il modello relazionale dei dati e linguaggio SQL. Select
... From
… Where
.
Introduzione alla programmazione in Python. Programmazione esplorativa. Gestione dati in formato tabellare.
Cenni di test e debugging.
Programma esteso
- Organizzazione di dati grezzi
- file, directory, tipi di file
- principali comandi da terminale
- file con delimitatori.
- Introduzione ai database.
- Il modello relazionale dei dati
- Il linguaggio SQL: Select ... From … Where su una tabella.
- Interrogazioni su più tabelle.
- Introduzione alla programmazione in Python.
- Array, liste, dizionari
- Cicli
- Organizzazione di un programma: funzioni
- Librerie
- Programmazione esplorativa. Gestione dati in formato tabellare.
- Jupyter Notebook
- Pandas
- Cenni di test e debugging.
Prerequisiti
Conoscenza di un linguaggio di programmazione
Modalità didattica
Lezioni e esercizi al computer.
Tutte le lezioni prevedono una prima parte (circa il 20% del tempo) dove vengono spiegati i contenuti in modalità erogativa, seguita da una parte interattiva basata sullo svolgimento di esercizi.
Le lezioni non vengono registrate nè trasmesse in streaming.
Materiale didattico
- Downey Think Python 2e: How To Think Like a Computer Scientist
- Downey Think Stats 2e
- Downey Elements of Data Science. This book is a bit too basic.
- VanderPlas, Python Data Science Handbook
- Elmasri, Navathe, Fundamentals of Database Systems
Periodo di erogazione dell'insegnamento
Primo semestre
Modalità di verifica del profitto e valutazione
L'esame consiste di due parti: uno scritto e un progetto da sviluppare in piccoli gruppi (max 3 persone). Entrambe le parti devono essere sostenute in Inglese.
L'esame scritto prevede domande a risposta aperta. Per la parte di Basi di Dati ogni domanda è una query SQL. Per la parte su Python, ogni domanda verterà sulla sintassi e semantica di un breve programma.
Nello scritto viene valutata la completezza e la correttezza delle risposte.
Il progetto in Python è svolto in piccoli gruppi (max 3 persone), e prevede una discussione approfondita e completa del progetto, dove viene valutata la capacità individuale di realizzare le analisi richieste e di giustificare le decisioni progettuali. Sia lo scritto che la presentazione del progetto devono essere completati entro Settembre 2024.
Se la discussione del progetto evidenzierà mancanze nella comprensione dell'elaborato, verrà assegnato un diverso progetto e la prova scritta superata non sarà più valida.
Il voto finale è ottenuto per 1/2 dalla prova scritta e per 1/2 dal progetto.
Non sono previste prove in itinere. Si ricorda che è necessario essere iscritti alle prove d'esame tramite segreterie online. Non verranno fatte eccezioni al riguardo.
Orario di ricevimento
Il ricevimento è online e su appuntamento a https://www.unimib.it/gianluca-della-vedova
Aims
At the end of the course, the students will understand how to query a database, and how to infer the implicit structure of a database from its tables.
Moreover, the students will be able to write and debug some simple programs in Python, to manage and analyze datasets consisting of a few interconnected tables, such as those usually available at kaggle.com (CSV, TSV, JSON formats). This part will taught with the Jupyter Notebook.
Finally, the students will be able to query a relational database using SQL, both via a dedicated interface and from a Python program.
Knowledge and understanding
This course provides basic knowledge and understanding on:
- Data bases
- SQL
- Programming in Python
- Jupyter notebooks
- Managing tabular datasets with Pandas
Ability to apply knowledge and understanding
At the end of the course the students will be able to:
- Write SQL queries
- Write Python notebooks to manage datasets
- Write Python notebooks to analyze and clean datasets
Independent evaluation
Students will be able to independently assess the quality of data to be processed and perform exploratory data analysis using a Jupyter Notebook.
Communication Skills
Students will be able to describe the decision-making processes that guided their approach to analyzing and cleaning a dataset.
Learning Skills
Students will be able to learn new programming languages dedicated to statistical analysis, with a particular focus on the R language.
Contents
Organizing raw datasets: file system, delimited files.
Introduction to data bases. Relational Data Model and SQL. Select
... From
… Where
.
Introduction to programming with Python. Explorative programmaing. Managing tabular data.
Introduction to testing and debugging.
Detailed program
- Organizing raw datasets
- files, directories, types of files
- main command-line commands
- delimiter-separated values
- Introduction to data bases.
- The Relational Data Model.
- SQL: Select ... From … Where on a table.
- Querying two or more tables.
- Introduction to programming in Python.
- Arrays, lists, dictionaries
- Loops
- Organization of a programma: functions
- Modules and libraries
- Explorative programming. Managing tabular data.
- The Jupyter Notebook
- Pandas
- Introduction to testing and debugging.
Prerequisites
Basic knowlege of any programming language
Teaching form
Lectures and exercises with a PC.
Lectures consist of two parts: the first part (approx. 20%) where the content will be introduced by the teacher, and a second (approx. 80%) , more interactive, part based on exercises.
Lectures will be neither recorded nor streamed.
Textbook and teaching resource
- Downey Think Python 2e: How To Think Like a Computer Scientist
- Downey Think Stats 2e
- Downey Elements of Data Science. This book is a bit too basic.
- VanderPlas, Python Data Science Handbook
- Elmasri, Navathe, Fundamentals of Database Systems
Semester
First
Assessment method
The exam consists of 2 parts: a written exam, and an oral discussion of a project completed in small groups (max 3 people). Both parts must be completed in English.
The written exam has open questions on SQL queries and on the Python basics.
The project covers the course contents.
The grading of the written exam is based on the correctness and the completeness of the answers. The written exam consists of writing 4 SQL queries, where each query corresponds to an open-ended question, and 2 questions on the syntax and semantics of a short Python program.
The grading of the project is based on the individual contribution that is displayed during the a complete and thorough oral discussion, including the ability to explain the choices made to complete the project, and on the fitness of the project to perform the required analysis. Both the written exam and the project discussion must be completed by September 2024.
If you don't show a complete understanding of your project, you will be assigned a different project and you will take to take again the written exam.
The final grade is computed with weights 50% the written exam and 50% the project.
There are no in-progress exams. Beware that you must be registered via "segreterie online" to take the exam. If you are not registered, you will not allowed to take the exam. No exceptions will be made.
Office hours
Office hourse are online. You can book a meeting at https://www.unimib.it/gianluca-della-vedova