This is database system concepts Give an expression in relat

This is database system concepts. Give an expression in 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)

1.Find the names of all employees who live in the city \"Brooklyn\".

2.Find the names and cities of residence of all employees who earn a salary of at least $50,000.

3.Find the names of all employees who work for the company \"Fedco\" and earn a salary of at least $50,000.

4.Find the names and cities of residence of all employees who work for a company located in the city \"Brooklyn\".

5.Find the number of employees managed by each manager.

6.Find the names of all employees who earn more than every employee of \"Small Bank Corporation\"

Solution

1]person_name(city_name= \"Brooklyn\")

2]person_name,city(salary <= $50,000)

3]person_name,city((company_name=\"Fedco ^ salary <= $50,000) works employee)

4]person_name,company_name(city_name = \"Brooklyn\" (works))

This is database system concepts. Give an expression in relational algebra to express each of the following queries: employee(person_name, street, city) works(p

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site