Uploaded by Omama Maaz

iTBL 4 - G3

advertisement
Department of Computer Science
1501263 Intro. to Database Management Systems
Fall 2021-2022
iTBL 4-B
Write the following queries in relational algebra:

Retrieve the Lname and Ssn of all employees in the Finance department.
Temp1
Temp2
Result

EMPLOYEE
∞
Dno= number
(Department)
ϬDname= ‘Finance’ (Temp1)
∏
Lname,Ssn
(Temp2)
Retrieve the Ssn of employess whose salary is greater than 40000 but does not work for the Research department.
Temp1
∏ SSn ( Ϭsalary>40000 (EMPLOYEE))
Temp2
ϬDname=”Research” (EMPLOYEE ∞ Dno= number (Department))
Temp3
∏Ssn (Temp2 )
Result
Temp1-Temp3
Department of Computer Science
1501263 Intro. to Database Management Systems
Fall 2021-2022
Download