Find the names and addresses of employees

Assignment Help PL-SQL Programming
Reference no: EM131431803

Assignment

1. Specify the following queries on the database schema shown in Figure.1 below using the relational algebra operators. Also show the result of each query if applied to the database of Figure.2. (Use the symbol σ for SELECT, Π for PROJECT, ς for EQUIJOIN, * for NATURAL JOIN, and f for FUNCTION)

(a) Retrieve the names of employees in department 5 who work more than 10 hours per week on the 'ProductX' project.

(b) List the names of employees who have a dependent with the same first name as themselves.

(c) Find the names of employees that are directly supervised by 'Franklin Wong'.

(d) For each project, list the project name and the total hours per week (by all employees) spent on that project.

(e) Retrieve the names of employees who work on every project.

(f) Retrieve the names of employees who do not work on any project

(g) For each department, retrieve the department name, and the average salary of employees working in that department.

(h) Retrieve the average salary of all female employees.

(i) Find the names and addresses of employees who work on at least one project located in Houston but whose department has no location in Houston

(j) List the last names of department managers who have no dependents.

1843_Figure.jpg

Figure. 1

451_Figure1.jpg

Figure. 2

2. Suppose each of the following update operations is applied directly to the database of Figure.2. Discuss all integrity constraints violated by each operation, if any, and the different ways of enforcing these constraints.

(a) Insert < 'Robert', 'F', 'Scott', '943775543', '21-JUN-42', '2365 Newcastle Rd, Bellaire, TX', M, 58000, '888665555', 1 > into EMPLOYEE.

(b) Insert < 'ProductA', 4, 'Bellaire', 2 > into PROJECT.

(c) Insert < 'Production', 4, '943775543', '01-OCT-88' > into DEPARTMENT

(d) Insert < '677678989', null, '40.0' > into WORKS_ON.

(e) Insert < '453453453', 'John', M, '12-DEC-60', 'SPOUSE' > into DEPENDENT

(f) Delete the WORKS_ON tuples with ESSN= '333445555'.

(g) Delete the EMPLOYEE tuple with SSN= '987654321'

(h) Delete the PROJECT tuple with PNAME= 'ProductX'

(i) Modify the MGRSSN and MGRSTARTDATE of the DEPARTMENT tuple with DNUMBER= 5 to '123456789' and '01-OCT-88', respectively

(j) Modify the SUPERSSN attribute of the EMPLOYEE tuple with SSN= '999887777' to '943775543'.

(k) Modify the HOURS attribute of the WORKS_ON tuple with ESSN= '999887777' and PNO= 10 to '5.0'

3. Specify the following views in SQL on the COMPANY database schema:

(a) A view that has the department name, manager name, and manager salary for every department.

(b) A view that has the employee name, supervisor name, employee salary for each employee who works in the 'Research' department.

(c) A view that has project name, controlling department name, number of employees, and total hours worked per week on the project for each project.

(d) A view that has project name, controlling department name, number of employees, and total hours worked per week on the project for each project with more than one employee working on it.

*Note- Send the solution in MS Word along with snaposhot images where required

Verified Expert

This assignment involves writing queries on database and extracting the useful information from them. The queries are written using relational algebra. by using symbols like for SELECT, PROJECT, EQUIJOIN, NATURAL JOIN, and FUNCTION. Then for the set of DML queries the integrity constraints violated by each operation and different ways of enforcing them are discussed. Then view is created on the COMPANY database schema to gather information about each department, project and employees working on each project.

Reference no: EM131431803

Questions Cloud

Identify the crime and types of cyber crimes : Business Case Problem: Using special software, South Dakota law enforcement officers found a person who appeared to posses' child pornography at a specific Internet address. The officers subpoenaed midcontinent communications, the service that ass..
Imaginary economy using the product : Calculate the GDP of this imaginary economy using the product, income and expenditure methods. Explain how these methods deal with the problem of double counting in the calculation of GDP.
Calculate the chi square test : Based on the 2x2 contingency table posted below calculate the chi square test to see if the result rejects the null hypothesis. You can calculate this long hand or use a standard calculator such as found at this site
Unemployment rate and natural rate of unemployment : Question 1: What is the difference(s), if any, between the unemployment rate and the natural rate of unemployment? Discuss.
Find the names and addresses of employees : Retrieve the names of employees in department 5 who work more than 10 hours per week on the 'ProductX' project and List the names of employees who have a dependent with the same first name as themselves.
Write a brief statement of your findings : Do the Kruskal-Wallis test. Explain the distinction between the hypotheses tested by Kruskal-Wallis and ANOVA.- Write a brief statement of your findings. Include a numerical comparison of the groups as well as your test result.
Government cutting taxes by amount : Assume in economy is in recession with a MPC of 0.75 and there is a GDP gap of $100 billion. How much must government spending increase to eliminate the gap? Instead of increasing government spending by the amount that you calculated what would be..
Is the conflict inevitable between united states and china : Is the conflict inevitable between the United States and China? If a conflict occurs in the future, are there ways to discourage them? Or are these conflicts just part of global politics between great powers?
Find the median number of beetles trapped by boards : Find the median number of beetles trapped by boards of each color. Which colors appear more effective? Use the Kruskal-Wallis test to see if there are significant differences among the colors. What do you conclude?

Reviews

inf1431803

3/24/2017 5:29:33 AM

This is totally FANTASTIC!!!! I can't thank you enough to help me out with this paper. You are EXTREMELY skilled and I can't get over how elegantly composed this paper is. It's PERFECT!! You were HIGHLY suggested for my venture and now I see why they "Exceedingly" prescribed you! Once more, bless your heart!

Write a Review

PL-SQL Programming Questions & Answers

  Write an application for the events

Closing the application. Close your running application by clicking its close box.

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Write the sql code to perform the tasks

Write the SQL code to perform the tasks requested in each problem. Define a new containing the product number, name, price, and quantity on hand along with the number of orders in which the product appears.

  Median-of-three partitioning method

Show the steps of partitioning  36, 38, 8, 31, 19, 15, 14, 35, 20, 7  with median-of-three partitioning method  (only show the first partition into 3 subparts, elements are less than pivot, pivot, elements are larger than pivots).

  Display all the columns from the orders table

Display all the columns from the Orders table that were paid with a Visa Card and have been shipped to the customer (hint: not a null). Order results by the Item Price in descending order.

  Create a package containing a procedure and a function

Follow the steps to create a package containing a procedure and a function pertaining to basket information. (Note: The first time you compile the package body doesn't give you practice with compilation error messages.)

  Describe theways to backup an oracle database

Describe three ways to backup an Oracle database

  Problems in a project

1. First read and analyze each problem; then implement both problems in a project called HW3. 2. For each exercise, insert comments on ID, Name, and HW#.

  Develop the queries using professional principles

Design and develop the queries using professional principles and standards - Two SQL Statements that return a subset of columns and a subset of rows using the WHERE clause.

  Write a select statement

Write a Select statement that determines whether the PaymentDate column of The Invoices table has any invalid values.

  Make a visio erd with primary and foreign keys

Combine the two diagrams make a visio ERD with Primary and Foreign keys.

  Explain your experiences related to your setup of mysql. in

Describe your experiences related to your setup of MySQL. Include any difficulties or issues that you had encountered during the installation.

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