views:

27

answers:

0

You are the DBA for the VeryFine Toy Company and create a relation called Employees with fields ename, dept, and salary. For authorization reasons, you also define views EmployeeNames (with ename as the only attribute) and DeptInfo with fields dept and avgsalary.

Show the view definition statements for EmployeeNames and DeptInfo. What privileges should be granted to a user who needs to know only average department salaries for the Toy and CS departments? You want to authorize your secretary to fire people (you will probably tell him whom to fire, but you want to be able to delegate this task), to check on who is an employee, and to check on average department salaries. What privileges should you grant? Continuing with the preceding scenario, you do not want your secretary to be able to look at the salaries of individuals. Does your answer to the previous question ensure this?

You want to give your secretary the authority to allow other people to read the EmployeeNames view. Show the appropriate command.