Database Management System - Old Questions

Question Answer Details

4.Consider the following employee database, where primary keys are underlined. [20]

employee (employee-name, street, city)

works (employee-name, company-name, salary)

company (company-name, manager-name)

manages (employee-name, manager-name)

Give an expression in SQL for each of the following queries.

a)Find the names of all employees who work for Second Bank Corporation.

b) Find the names, street and cities of residence of all employees who work for Second Bank

Corporation.

c)Find the names, street addresses, and cities of residence of all employees who work for Second

Bank Corporation and earn less than $10,000.

d) Find the names of all employees who work under the manager “Devi Prasad”.

e)Find the number of employees having salary greater than or equal to 20000

20 marks
Asked in 2071

Answer

AI Generated Answer

AI is thinking...