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

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  Write sql queries

Write a query to display the last name, department number, and salary of any employee whose department number and salary both match the department number and salary of any employee who earns a commission.

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  What is an sql injection attack

What is an SQL injection attack? Explain how it works, and what precautions must be taken to prevent SQL injection attacks.What are two advantages of encrypting data stored in the database?

  Determine resonant frequency in series rlc resonant circuit

Given the series RLC resonant circuit in the figure, operating at variable frequency, determine: The resonant frequency ω o ,  The circuit’s quality factor Q , The cut-off frequencies, f 1  & f 2  and the bandwidth BW

  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).

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  Sql query into a relational algebra statement

Turn this SQL query into a relational algebra statement? SELECT Request.reqfor, Ordering.invamt, Ordering.invnbr, Ordering.invdat

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