A DreamHome database has following tables. Branch (branchNo, street, city, postcode) Staff (staffNo, fName, lName, position, sex, DOB, salary, branchNo) PropertyForRent (propertyNo, street, city, postcode, type, rooms, rent, ownerNo, staffNo, branchNo) PrivateOwner (ownerNo, fName, lName, address, telNo) Which is the correct relational algebra to express the following query? List the city and street of all branches which assistant staff’s salary is not greater than 9000 and age is at least 31. ( ) $$\Pi_{branchNo,street,city}(\sigma_{position='assistant' \wedge salary≤9000 \wedge DOB>'1-Jan-1990'} (Staff \bowtie Branch))$$ ( ) $$\sigma_{branchNo,street,city}(\Pi_{position=’assistant’ \wedge salary≤9000 \wedge DOB>’1-Jan-1990’}(Staff \cap Branch))$$ ( ) $$\sigma_{branchNo,street,city}(\sigma_{position=’assistant’ \wedge salary<9000 \wedge DOB>31}(Staff \bowtie Branch))$$ ( ) $$\Pi_{branchNo,street,city}(\sigma_{position=’assistant’ \wedge salary≤9000 \wedge DOB<’1-Jan-1990’}(Staff \bowtie Branch))$$
A DreamHome
Branch (branchNo, street, city, postcode)
Staff (staffNo, fName, lName, position, sex, DOB, salary, branchNo)
PropertyForRent (propertyNo, street, city, postcode, type, rooms, rent, ownerNo, staffNo, branchNo)
PrivateOwner (ownerNo, fName, lName, address, telNo)
Which is the correct relational algebra to express the following query?
List the city and street of all branches which assistant staff’s salary is not greater than 9000 and age is at least 31.
( ) $$\Pi_{branchNo,street,city}(\sigma_{position='assistant' \wedge salary≤9000 \wedge DOB>'1-Jan-1990'} (Staff \bowtie Branch))$$
( ) $$\sigma_{branchNo,street,city}(\Pi_{position=’assistant’ \wedge salary≤9000 \wedge DOB>’1-Jan-1990’}(Staff \cap Branch))$$
( ) $$\sigma_{branchNo,street,city}(\sigma_{position=’assistant’ \wedge salary<9000 \wedge DOB>31}(Staff \bowtie Branch))$$
( ) $$\Pi_{branchNo,street,city}(\sigma_{position=’assistant’ \wedge salary≤9000 \wedge DOB<’1-Jan-1990’}(Staff \bowtie Branch))$$

Step by step
Solved in 4 steps with 2 images









