Design a Relational Database for Bank Emoployees

Consider the relational database stated below:

employee (employee-name, street, city)
works (employee-name, company-name,salary)
company (company-name, city)
manages (employee-name, manager-name)

For each of the following queries, give an expression in the relational algebra, the tuple relational calculus, and the domain relational calculus:

(a) Find the names of all employees who work for NRB Bank Corporation.
(b) Find the names and cities of residence of all employees who work for NRB Bank Corporation.
(c) Find the names, street address, and cities of residence of all employees who work for NRB Bank Corporation and earn more than BD100,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 NRB Bank Corporation.

(g) Find the names of all employees who earn more than every employee of BRAC Bank Corporation
(h) Assume the companies may be located in several cities. Find all companies located in every city in which BRAC Bank Corporation is located.

Draw an E-R diagram for all the situations described above.

Answer:


No comments:

Post a Comment

Popular Posts