Programming and Databases
Keywords |
Classification |
Keyword |
OFICIAL |
Computer Science |
Instance: 2024/2025 - 1S 
Cycles of Study/Courses
Teaching Staff - Responsibilities
Teaching language
English
Objectives
Introduction to computer programming using the Python language. Values, types, and expressions. Functions and procedures. Conditions and selection. Iteration and recursion. Data structures and fundamental algorithms: sequence processing, text. Files and dictionaries.
Database modeling using the entity-relationship model. Implementation of relational databases using SQL. Database queries using SQL. Connecting the Python language to the SQLite DBMS.
Learning outcomes and competences
Program autonomously in the Python programming language, gaining skills to learn and program in other programming languages.
Ability to model and implement relational databases and their manipulation through the SQL language.
Working method
Presencial
Program
Python:
1. Introduction to Python: variables, expressions and instructions.
2. Interactive use of Python language; defining scrips and short functions.
3. Conditions and logical values; instructions for conditional execution.
4. Cicles and iteration. Examples using turtle graphics.
5. Using pseudo-random numbers; examples for simulation.
6. Implementation of basic algorithms.
7. Processing indexed variables (lists) and text (strings).
8. Writing and reading data as text files; plotting data using external tools.
9. Recursion.
Databases:
10. Databases: the ER and EER model.
11. The relational model.
12. The SQL language.
Database access with python:
13. Python and SQLite connection from Python to SQLite databases.
14. Cursors and manipulation of SQL query results in Python.
Mandatory literature
Allen Downey;
How to think like a computer scientist. ISBN: 0-9716775-0-6
Ramez Elmasri;
Fundamentals of database systems. ISBN: 9780805317534 pbk
Teaching methods and learning activities
Theoretical teaching with presentation based on projected notes.
Take advantage of examples by developing small programs interactively in Python during presentation classes.
Laboratory classes with computers where students solve small chips with varied problems, with the support of the teacher.
Practical exercises on computer (self-evaluation) to make out of classes and using a platform for automatic validation of programs and SQL queries through unit tests.
Evaluation Type
Distributed evaluation without final exam
Assessment Components
designation |
Weight (%) |
Trabalho prático ou de projeto |
20,00 |
Teste |
80,00 |
Total: |
100,00 |
Amount of time allocated to each course unit
designation |
Time (hours) |
Elaboração de projeto |
30,00 |
Estudo autónomo |
90,00 |
Frequência das aulas |
42,00 |
Total: |
162,00 |
Eligibility for exams
Required to obtain a minimum grade of 40% in the final exam.
Calculation formula of final grade
he final grade (CF) corresponds to the weighted average of the grades obtained in the Project (Prj) and the Final Exam (EF):
CF = 0.2Prj + 0.8EF
Special assessment (TE, DA, ...)
Students with special circumstances should discuss their situation with the Professor.
Classification improvement
The final grade "Melhoria de Classificação" (CM) is the weighted average of the grades obtained in the project (Prj), and in the exam "Melhoria de Classificação" (Exm):
CM = 0.2*Prj + 0.8*Exm