1
628views
Advanced databse management system questions
written 2.3 years ago by | • modified 2.3 years ago |
Consider the following relational schema.
Emp(eid: integer, ename: string, age: integer, salary: real)
Works(eid: integer, did: integer, pct time: integer)
Dept(did: integer, dname: string, budget: real, managerid: integer)
Create the tables along with necessary constraints and insert values appropriately.
Write the following queries in SQL:
- Print the name of each employee whose salary exceeds the budget of all of the departments that he or she works in.
- Find the enames of managers who manage the departments with the largest budgets.
- Create view which will hide the salary, managerid details from emp and dept .
- If a manager manages more than one department, he or she controls the sum of all the budgets for those departments. Find the managerids of managers who control more than $5 million
Note:[ Please update an answer before 12:00 A.M. (-_-) ]
ADD COMMENT
EDIT