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: 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

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

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Databases questions

Question

Why does the pupil of the eye appear black?

Answered: 1 week ago

Question

Why do we forget information?

Answered: 1 week ago