Programming and Databases
Keywords |
Classification |
Keyword |
OFICIAL |
Computer Science |
Instance: 2020/2021 - 1S
Cycles of Study/Courses
Teaching language
English
Objectives
Introduction to programming using the Python language. Values, types and expressions. Functions and procedures. Conditionals and selection. Iteration and recursion. Basic data structures and algorithms: data processing, text.
Scientific programming with python.
Database modelling using the entity/relationship model.
Relational database implementaion with SQL. Database queries using the SQL language.
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. Numerical solution of equations; 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 (e.g. gnuplot).
9. Recursion.
Databases:
10. Databases: the ER and EER model.
11. The relational model.
12. Conversion of the EER model to the relational model.
13. The SQL language.
Database access with python:
14. Python and MySQL, connection from Python to MySQL databases.
15. Cursors and manipulation of SQL query results in Python.
16. The MySQLdb module and psycopg2.
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 through unit tests.
Evaluation Type
Distributed evaluation without final exam
Assessment Components
designation |
Weight (%) |
Trabalho prático ou de projeto |
30,00 |
Teste |
70,00 |
Total: |
100,00 |
Amount of time allocated to each course unit
designation |
Time (hours) |
Elaboração de projeto |
32,00 |
Estudo autónomo |
88,00 |
Frequência das aulas |
42,00 |
Total: |
162,00 |
Eligibility for exams
Project development.
Calculation formula of final grade
The final grade (FG) is the weighted average of the grades obtained in the project (Prj) and in the two tests (T1 and T2):
FG = 0.3*Prj + 0.35*T1 + 0.35*T2
If FG < 9.5 (in 20 marks), then students are still eligible for "exame de recurso" (ExR). In this case final grade is:
FG = 0.3*Prj + 0.7*ExR