Check on average department salaries

Assignment Help Basic Computer Science
Reference no: EM131210859

You are the DBA for the VeryFine Toy Company, and you 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. The latter lists the average salary for each department.

1. Show the view definition statements for EmployeeNames and DeptInfo.

2. What privileges should be granted to a user who needs to know only average department salaries for the Toy and CS departments?

3. You want to authorize your secretary to fire people (you'll 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?

4. Continuing with the preceding scenario, you don't want your secretary to be able to look at the salaries of individuals. Does your answer to the previous question ensure this? Be specific: Can your secretary possibly find out salaries of some individuals (depending on the actual set of tuples), or can your secretary always find out the salary of any individual that he wants to?

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

6. Your secretary defines two new views using the EmployeeNames view. The first is called AtoRNames and simply selects names that begin with a letter in the range A to R. The second is called HowManyNames and counts the number of names. You are so pleased with this achievement that you decide to give your secretary the right to insert tuples into the EmployeeNames view. Show the appropriate command, and describe what privileges your secretary has after this command is executed.

7. Your secretary allows Todd to read the EmployeeNames relation and later quits. You then revoke the secretary's privileges. What happens to Todd's privileges?

8. Give an example of a view update on the above schema that cannot be implemented through updates to Employees.

9. You decide to go on an extended vacation, and to make sure that emergencies can be handled, you want to authorize your boss Joe to read and modify the Employees relation and the EmployeeNames relation (and Joe must be able to delegate authority, of course, since he's too far up the management hierarchy to actually do any work). Show the appropriate SQL statements. Can Joe read the DeptInfo view?

10. After returning from your (wonderful) vacation, you see a note from Joe, indicating that he authorized his secretary Mike to read the Employees relation. You want to revoke Mike's SELECT privilege on Employees, but you don't want to revoke the rights that you gave to Joe, even temporarily. Can you do this in SQL?

11. Later you realize that Joe has been quite busy. He has defined a view called AllNames using the view EmployeeNames, defined another relation called StaffNames that he has access to (but that you can't access), and given his secretary Mike the right to read from the AllNames view. Mike has passed this right on to his friend Susan. You decide that even at the cost of annoying Joe by revoking some of his privileges, you simply have to take away Mike and Susan's rights to see your data. What REVOKE statement would you execute? What rights does Joe have on Employees after this statement is executed? What views are dropped as a consequence?

Reference no: EM131210859

Questions Cloud

Define strategic leadership : Define strategic leadership and describe in detail how each level of the domain of strategic leadership support the overall concept. Give an example of strategic leadership you have seen yourself. Explain the circumstances and why you consider i..
Write a five pages essay on the biotransformation : Write a 3-5 page essay on the following: on Biotransformation. Cite references in APA format. Write a 3-5 page essay on the following: Pick a toxin and in detail explain how it is absorbed, distributed and excreted.
What is the role of the dba with respect to security : Explain how a company offering services on the Internet could use public-key encryption to make its order-entry process secure. Describe how you would use DES encryption for the same purpose, and contrast the public-key and DES approaches
How much sulfur and how much sulfuric acid can be produced : How much sulfur and how much sulfuric acid (in Kg) can be produced from the SO2 according to part (a) of this question. What would be the pH of the rain at 298K?
Check on average department salaries : What privileges should be granted to a user who needs to know only average department salaries for the Toy and CS departments?
Draw and refer to graphs of supply and demand curves : f the countries allow free trade in raisins, explain why $3.50 per kilogram cannot be the free-trade equilibrium world price for raisins.-draw and refer to graphs of supply and demand curves for the two national markets.
Identify several challenges in the organization : Identify several challenges in the organization that might result from diversity-related issues that might require managed change. Determine the levels in the organization that might be impacted by the managed change.
Does importing country still gain from free trade : Does the importing country still gain from free trade in furniture?-  Does the exporting country still gain from free trade in furniture?
Create at least one clustered index on every relation : Which factors would you consider in deciding whether to make an index on a relation a clustered index? Would you always create at least one clustered index on every relation?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Determine what fraction of processor time is consumed

Consider a system employing interrupt-driven I/O for a particular device that transfers data at an average of 8 KB/s on a continuous basis.

  Access and its limitations in distributed business model

describe the difference of the two terms and how they work together. Your post should include the following details: A description of Access and its limitations in a distributed business model.

  Computing the bits of information

A 3000-km-long T1 trunk is used to transmit 64-byte frames using Go-Back-N protocol. If the propagation speed is 6 microseconds/km, how many bits should the sequence numbers be?

  Descriptions of data formats and to interpret raw data

The aim of this project is to exercise and test your ability to read and understand descriptions of data formats and to interpret raw data according to a particular format.  In this exercise you will produce and read the dump of a ZIP file.

  What resistance to a process improvement program might arise

What resistance to a process improvement program might arise and why?

  Discuss the various types of inner join operations

Discuss the various types of inner join operations.

  The function return the value of the ticket price

The function return the value of the ticket price time the discount percentage.

  Analysis of how current and future technology trends

Analyze previous submissions and make changes as necessary to the final paper. Continue development of the project or research with a 3-5 page detailed analysis of how current and future technology trends might impact the project or research performe..

  What are typical project tasks in project closure phase

In iterative projects, find out how project closure is different compared to project closure in traditional projects. What are typical project tasks in project closure phase?

  How do you access the templates

You are about to create your first PowerPoint presentation and you want to utilize the default templates to help you in your slide design. How do you access the templates?

  Create powerpoint presentation on computer hardware

Create your PowerPoint presentation on one of the 9 topics listed below: Depending on the first letter of your family name. Examples; Student with name "Eric Smith", will do section S-T.

  Update the variables belonging to the main program

Write a program using functions where a function collects 8 numbers from the user, finds the largest, smallest of those 8 numbers and uses passing by reference to update the variables belonging to the main program.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd