Show the view defnition statements for employeenames and

Assignment Help Database Management System
Reference no: EM13507666

You are the DBA for the VeryFine Toy Company and create a relation called Employees with ?elds ename, dept, and salary. For authorization reasons, you also de?ne views EmployeeNames (with ename as the only attribute) and DeptInfo with ?elds dept and avgsalary. The latter lists the average salary for each department. 

1. Show the view de?nition 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 ?re people (you will probably tell him whom to ?re, 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 do not want your secretary to be able to look at the salaries of individuals. Does your answer to the previous question ensure this? Be speci?c: Can your secretary possibly ?nd out salaries of some individuals (depending on the actual set of tuples), or can your secretary always ?nd out the salary of any individual 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 de?nes two new views using the EmployeeNames view. The ?rst 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 preceding schema that cannot be imple-mented 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 is 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 do not want to revoke the rights you gave to Joe, even temporarily. Can you do this in SQL?

11. Later you realize that Joe has been quite busy. He has de?ned a view called All-Names using the view EmployeeNames, de?ned another relation called Sta?Names that he has access to (but you cannot 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: EM13507666

Questions Cloud

Considering that the goal is to create a healthier community : Considering that the goal is to create a healthier community, what types of organizations and individuals do you expect to join the Summerville Community Coalition?
About eating puppies and kittens : What is your opinion about eating toasted ants, about eating fried frog legs, about eating puppies and kittens? About eating raw monkey brains?
Explain the image of social change and fundamental elements : How do I explain the image of social change and the fundamental elements dealing with each three theoretical frameworks?
Develop a minimum cost schedule : Develop a minimum cost schedule (of start-times and 2hr and 3hr shift assignments) for the part-time employees? What is the daily labor expense for part-time employees?
Show the view defnition statements for employeenames and : You want to authorize your secretary to ?re people (you will probably tell him whom to ?re, but you want to be able to delegate thistask), to check on who is an employee, and to check on average department salaries. What privileges should you grant?
Assume that you would like mary to be able to verify that : Assume that you would like Mary to be able to verify that all your email mes- ages are really sent from you. How can you authenticateyour messages without encrypting the actual text?
Explain what is the weight of the extinguisher : A fire extinguisher with a volume of 1.0 ft3 initially contains CO2 at 20 oC and atmospheric pressure and weighs 25 pounds. After being charged with CO2 to a pressure of 300 psig at 20 oC, what is the weight of the extinguisher.
Explain coke to produce molten iron and carbon monoxide : Which contains the larger number of molecules, 10.0 g H2O or 10.0 g H2O2. In a blast furnace, iron (III) oxide reacts with coke (carbon) to produce molten iron and carbon monoxide
Explain a time by precipitation using the reagents : You are given a solution of the following cations in water: Ag+, Co2+, Ba2+, Zn2+, and Sn2+. You want to separate the ions out one at a time by precipitation using the following reagents: NaF, NaI, Na2SO4, and NaCl.

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

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