Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the base table EMP(Ename, Dept, Salary) containing employees' name, department and salary. You want your secretary to check on the department of each employee
Consider the base table EMP(Ename, Dept, Salary) containing employees' name, department and salary. You want your secretary to check on the department of each employee and to check on average department salaries (but not the salary of an individual employee), so you define the view EmployeeNames with fields Ename and Dept, and the view DeptInfo with fields Dept and AvgSalary: CREATE VIEW EmployeeNames(Ename, Dept) AS SELECT Ename, Dept FROM EMP; CREATE VIEW DeptInfo (Dept, AvgSalary) AS SELECT FROM GROUP BY Dept, AVG(Salary) AS AvgSalary EMP Dept; Then you grant the following privileges to the secretary: GRANT SELECT ON EmployeeNames TO "secretary"; GRANT SELECT ON DeptInfo TO "secretary"; 4 These views restrict the secretary to access the names and departments of employees and the average salary of each department, but not the salary of individual employees. Show that the secretary can still derive the salary of an employee by accessing the above two view over time. You can assume that each department has more than one employee (so the average is not equal to the salary of an individual), and over time the instance of the base table EMP can be modified (i.e., inserting or deleting records) by the table's owner.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started