Engenharia Informática; Unidade Curricular de Bases de Dados I (2ºAno, 3º Semestre)
URL – http://www.estgp.pt/docentes/lopes
Docente – Secundino Domingos Marques Lopes (firstname.lastname@example.org)
A university database contains information about professors (identified by
social security number, or SSN) and courses (identified by courseid). Professors teach
courses; each of the following situations concerns the Teaches relationship set. For each
situation, draw an ER diagram that describes it (assuming that no further constraints
Professors can teach the same course in several semesters, and each offering
must be recorded.
Professors can teach the same course in several semesters, and only the most
recent such offering needs to be recorded. (Assume this condition applies in all
Every professor must teach some course.
Every professor teaches exactly one course (no more, no less).
Every professor teaches exactly one course (no more, no less), and every course
must be taught by some professor.
Now suppose that certain courses can be taught by a team of professors jointly,
but it is possible that no one professor in a team can teach the course. Model this
situation, introducing additional entity sets and relationship sets if necessary.
Consider the following information about a university database:
Professors have an SSN, a name, an age, a rank, and a research specialty.
Projects have a project number, a sponsor name (e.g., NSF), a starting date, an
ending date, and a budget.
Graduate students have an SSN, a name, an age, and a degree program (e.g.,
M.S. or Ph.D.).
Each project is managed by one professor (known as the project's principal
Each project is worked on by one or more professors (known as the project's co-
Professors can manage and/or work on multiple projects.
Each project is worked on by one or more graduate students (known as the
project's research assistants).
When graduate students work on a project, a professor must supervise their work
on the project. Graduate students can work on multiple projects, in which case
they will have a (potentially different) supervisor for each one.