[Solved] DBS301-Lab 8 Views and Permissions

$25

File Name: DBS301-Lab_8_Views_and_Permissions.zip
File Size: 320.28 KB

SKU: [Solved] DBS301-Lab 8 Views and Permissions Category: Tag:
5/5 - (1 vote)

This weeks lab continues using the SELECT command in addition to now incorporating multiple tables and various set operators to produce results.

Tasks

  • Display the names of the employees whose salary is the same as the lowest salaried employee in any department.
  • Display the names of the employee(s) whose salary is the lowest in each department.
  • Give each of the employees in question 2 a $120 bonus.
  • Create a view named vwAllEmps that consists of all employees includes employee_id, last_name, salary, department_id, department_name, city and country (if applicable)
  • Use the vwAllEmps view to:
    1. Display the employee_id, last_name, salary and city for all employees
    2. Display the total salary of all employees by city
    3. Increase the salary of the lowest paid employee(s) in each department by 120
    4. What happens if you try to insert an employee by providing values for all columns in this view?
    5. Delete the employee named Vargas. Did it work? Show proof.
  • Create a view named vwAllDepts that consists of all departments and includes department_id, department_name, city and country (if applicable)
  • Use the vwAllDepts view to:
  1. For all departments display the department_id, name and city
  2. For each city that has departments located in it display the number of departments by city
  • Create a view called vwAllDeptSumm that consists of all departments and includes for each department: department_id, department_name, number of employees, number of salaried employees, total salary of all employees. Number of Salaried must be different from number of employees. The difference is some get commission.
  • Use the vwAllDeptSumm view to display department name and number of employees for departments that have more than the average number of employees
  • A) Use the GRANT statement to allow another student (Neptune account) to retrieve data for your employees table and to allow them to retrieve, insert and update data in your departments table. Show proofB) Use the REVOKE statement to remove permission for that student to insert and update data in your departments table

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] DBS301-Lab 8 Views and Permissions
$25