Information

Author(s) Quentin Cappart
Deadline Keine Frist
Abgabenlimit No limitation

Einloggen

Lecture d'algèbre relationnelle

Pour cette question, on va considérer ces relations de la base de données university :

  • \(\mathsf{course}(\underline{course\_id}, title, dept\_name, credits)\)
  • \(\mathsf{prereq}(\underline{course\_id},\underline{prereq\_id})\)
  • \(\mathsf{department}(\underline{dept\_name}, building, budget)\)
  • \(\mathsf{student}(\underline{ID}, name, dept\_name, tot\_credit)\)
  • \(\mathsf{instructor}(\underline{ID}, name, dept\_name, salary)\)
  • \(\mathsf{advisor}(\underline{s\_ID}, i\_ID)\)

Nous n'avons pas besoin de connaître les tuples de la table. Réferez vous au diagramme des schémas pour repérer les référencements via les clefs étrangères.

Indiquez l'énoncé correspondant aux requêtes suivantes.


Question 1:

\(\pi_{ID}(student) - \pi_{s\_ID}(advisor)\)

Question 2:

\(\pi_{dept\_name}(student) - \pi_{dept\_name}(department)\)

Question 3:

\(|\pi_{dept\_name}(student \bowtie_{student.dept\_name=department.dept\_name} department)|\)

Question 4:

\(\pi_{ID}(student \bowtie advisor)\)

Question 5:

\(\pi_{course\_id}(course) - \pi_{course\_id}(prereq)\)

Question 6:

\(\pi_{student.name}(\sigma_{student.ID=advisor.s\_ID \land advisor.i\_ID=instructor.ID}(student \times advisor \times instructor))\)

Question 7:

\(\pi_{dept\_name}(department) - \pi_{dept\_name}(course)\)

Question 8:

\(\pi_{ID,name}(student) - \pi_{student.ID,student.name}(student \bowtie advisor)\)

Question 9:

\(|\pi_{i\_ID}(advisor)|\)

Question 10:

\(\pi_{dept\_name}(student) \cap \pi_{dept\_name}(instructor)\)

Question 11:

\(\pi_{student.ID}(\sigma_{student.dept\_name=instructor.dept\_name \land instructor.salary>90000}(student \times instructor))\)

Question 12:

\(\pi_{ID}(student) - \pi_{student.ID}(\sigma_{student.dept\_name=instructor.dept\_name}(student \times instructor))\)

Question 13:

\(\pi_{ID}(student) - \pi_{ID}(student \bowtie_{student.dept\_name=instructor.dept\_name} instructor)\)

Question 14:

\(\pi_{dept\_name}(student) \subseteq \pi_{dept\_name}(department)\)

Question 15:

\(\pi_{i\_ID}(advisor) - \pi_{ID}(instructor)\)

Question 16:

\(|\pi_{dept\_name}(student \times instructor)|\)

Question 17:

\(\pi_{dept\_name}(course) - \pi_{dept\_name}(student)\)

Question 18:

\(\pi_{student.ID}(student) \cap \pi_{advisor.s\_ID}(advisor)\)

Question 19:

\(\pi_{course\_id}(\sigma_{course.dept\_name=department.dept\_name}(course \times department))\)

Question 20:

\(\pi_{dept\_name}(student \bowtie_{student.dept\_name=department.dept\_name} department) = \pi_{dept\_name}(student)\)