Answered step by step
Verified Expert Solution
Link Copied!

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:image text in transcribed

Question 6(10 marks) 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 Dept, AVG(Salary) AS AvgSalary FROM EMP GROUP BY 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 (but not by the secretary)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

using signal flow graph

Answered: 1 week ago