CS计算机代考程序代写 Exercise 2_Relational Algebra_Solution

Exercise 2_Relational Algebra_Solution

Exercise 2 – Solution
Q1

Q2

!

Q3

Q4

(It’s possible to have duplicate author names)

Q5

Q6

Q7

!

Q8

π{name,subj}(σ(mark>70)(STUDEN T ⋈(sid=stude) M A RK ))

A ← π{authorID}author − π{authorID}book

B ← π{ firstName,lastName}(A ⋈ author)

A ← π{authorID}book

B ← π{authorID}authorPub

C ← π{ f irstName,lastName}((A − B ) ⋈ auth or)

Q9

Q10