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

  Explain the average length of stay per room type

What is the average length of stay per room type. What is the average number of visitor per room type. What is the base income per room (i.e., length of visit multiplied by the daily rate) during a specified period of time

  Expanded entity relationship model diagram

Each department has many employees assigned to it, but each employee works for only one department at one of the factories. An employee cannot work at more than one factory at a time.

  Your supervisors and customers are very impressed with the

your supervisors and customers are very impressed with the database you have put together. however there is still that

  Find entity relationship and relational database modelling

You are required to design (using an E-R diagram) an entity-relationship model of the problem, convert the model into a relational model, and assess the normal form of each schema.

  Imagine that you have been hired as a consultant to assist

imagine that you have been hired as a consultant to assist in streamlining the data processing of an international

  Create database that implements the proposed data warehouse

Knowing the customers for targeted advertising. The board would like to know which type of customers (age or gender) are more interested in which types of cars (type)

  Create database to produce reports using surrogate keys

Complete following task. In each exercise, represent answer in both DBDL and with diagram. You may use any of styles for diagram. Create database to produce following reports. Do not use any surrogate keys in design.

  Computer applications that run on desktop and laptop

computer applications that run on desktop and laptop computers have for a long time been designed to be driven by

  Create a vlookup criteria table

Create and use named ranges for range references (I ended up with about 30 named ranges).

  Create database for cover 2010 tour de france cycling race

Draw an Entity-Relationship diagram for this database using UML notation. Be sure to include all the entities mentioned above, together with attributes (including primary key attributes).

  In this project you will perform the physical design and

in this project you will perform the physical design and implementation using sql data definition language ddl and

  A county wishes to create a database

A county wishes to create a database to control its local libraries. Each library has a number of employees, one of whom is designated as the manager of the library and is responsible for supervising employees and the general day-to-day management..

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