13,777 views
0 votes
0 votes
Give an expression in the relational algebra to express each of the following queries:
employee (person-name, street, city)
works (person-name, company-name, salary)
company (company-name, city)
manages (person-name, manager-name)

 a. Find the names of all employees who work for First Bank Corporation.
 b. Find the names and cities of residence of all employees who work for First Bank Corporation.
 c. Find the names, street address, and cities of residence of all employees who work for First Bank Corporation and earn more than $10,000 per annum.
 d. Find the names of all employees in this database who live in the same city as the company for which they work.
 e. Find the names of all employees who live in the same city and on the same street as do their managers.
f. Find the names of all employees in this database who do not work for First Bank Corporation. g. Find the names of all employees who earn more than every employee of Small Bank Corporation.
h. Assume the companies may be located in several cities. Find all companies located in every city in which Small Bank Corporation is located

1 Answer

Related questions

0 votes
0 votes
0 answers
1
aashijn asked Apr 28, 2022
1,331 views
employee (person-name, street, city)works (person-name, company-name, salary)company (company-name, city)manages (person-name, manager-name) a. Find the names of all empl...
0 votes
0 votes
1 answer
2
CJ147 asked Oct 11, 2018
597 views
The Following code has output Gate2019 #include <stdio.h char* fun(){ char* temp = "Gate2019"; return temp; } int main(void) { // your code goes here puts(fun()); return...
1 votes
1 votes
3 answers
4
spriti1991 asked Mar 18, 2015
2,340 views
Consider the SDT , where S ->TR, R- +TR|empty {print ("+")} , And T- num {print(num)} And if the input is given "9+5+2" What is output ?