6. Using relational algebra, produce a report of all employees from the IT and planning departments...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
6. Using relational algebra, produce a report of all employees from the IT and planning departments who are born after 1990. The following tables form part of a database held in an RDBMS: Employee (empNo, fName, IName, address, DOB, sex, position, deptNo) Department (deptNo, deptName, mgrEmpNo) Project (projNo, projName, deptNo) WorksOn (empNo, projNo, dateWorked, hoursWorked) where Employee Department Project and WorksOn contains employee details and empNo is the key. contains department details and deptNo is the key. mgrEmpNo identifies the employee who is the manager of the department. There is only one manager for each department. contains details of the projects in each department and the key is projNo (no two departments can run the same project). contains details of the hours worked by employees on each project, and empNo/ projNo/dateWorked form the key. Formulate the following queries in relational algebra, tuple relational calculus, and domain relational calculus. a) List all employees. b) List all the details of employees who are female and born after 1990. c) List all employees who are not managers and are paid more than $1500. d) Produce a list of the names and addresses of all employees who work for the IT department. e) Produce a list of the names of all employees who work on the SCCS project. f) Produce a complete list of all managers who are due to retire this year, in alphabetical order of surname. g) Formulate the following queries in relational algebra. h) Find out how many managers are female. i) Produce a report of all projects under the IT department. j) Using the union operator, retrieve the list of employees who are neither managers nor supervisors. Attributes to be retrieved are first name, last name, position, sex and department number. 6. Using relational algebra, produce a report of all employees from the IT and planning departments who are born after 1990. The following tables form part of a database held in an RDBMS: Employee (empNo, fName, IName, address, DOB, sex, position, deptNo) Department (deptNo, deptName, mgrEmpNo) Project (projNo, projName, deptNo) WorksOn (empNo, projNo, dateWorked, hoursWorked) where Employee Department Project and WorksOn contains employee details and empNo is the key. contains department details and deptNo is the key. mgrEmpNo identifies the employee who is the manager of the department. There is only one manager for each department. contains details of the projects in each department and the key is projNo (no two departments can run the same project). contains details of the hours worked by employees on each project, and empNo/ projNo/dateWorked form the key. Formulate the following queries in relational algebra, tuple relational calculus, and domain relational calculus. a) List all employees. b) List all the details of employees who are female and born after 1990. c) List all employees who are not managers and are paid more than $1500. d) Produce a list of the names and addresses of all employees who work for the IT department. e) Produce a list of the names of all employees who work on the SCCS project. f) Produce a complete list of all managers who are due to retire this year, in alphabetical order of surname. g) Formulate the following queries in relational algebra. h) Find out how many managers are female. i) Produce a report of all projects under the IT department. j) Using the union operator, retrieve the list of employees who are neither managers nor supervisors. Attributes to be retrieved are first name, last name, position, sex and department number.
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Consider the following relational schema: Staff ( staffNo , name, dept, skillCode) Skill ( skillCode , description, chargeOutRate) Project ( projectNo ,...
-
Identify two companies, one that you believe pursues a low-cost strategy and another that pursues a differentiation strategy. Relying on personal knowledge, company annual reports, or articles in...
-
In schema normalisation, is Boyce-Codd Normal Form (BCNF) always to be preferred over 3rd Normal Form (4NF)? Explain your answer. [5 marks] 8 (TURN OVER) CST.2004.7.4 8 Economics, Law and Ethics (a)...
-
Let A(c) denote the area of the region bounded from above by the line y = x + 1, from the left by the y-axis, from below by the x-axis, and from the right by the line x = c. Such a function is called...
-
According to the latest national crime victims survey, how many nonfatal violent crimes including rape, assault, and robbery, occurred against people while they were at work?
-
Write a Monte Carlo code for a system of \(N\) hard spheres of diameter \(D\) on a one-dimensional ring of length \(L\) with periodic boundary conditions. Calculate the pair correlation function and...
-
Monczka-Trent Shipping is the logistics vendor for Handfield Manufacturing Co. in Ohio. Handfield has daily shipments of a power-steering pump from its Ohio plant to an auto assembly line in Alabama....
-
8. A straight section of railroad track crosses two highways 400 m and 600 m from an intersection. Find the dimensions of the largest rectangular lot that can be laid out in the triangle formed by...
-
Which 3 of these can a Company admin user do in QuickBooks Online? Change their user level to Primary admin Add new Primary admin users Change the QuickBooks Online subscription Access the client's...
-
1. You earned 12% on your investments last year. During that time period, inflation averaged 6 percent. What was your real rate of return based on the Fisher formula? 2. A 10 year bond was issued...
-
Evaluate the C code statements in MIPS assembly code for(i = 0; i
-
Find the x and y-intercept s of the linear function. Linear Function: 3x-5y=-15 x-Intercept: y-Intercept:
-
A cougar can run 25 miles per hour. A cheetah can run 55 miles per hour. If they both run for 3 hours at full speed, how much farther will the cheetah run?
-
29. Consider the following algorithm: for (i = 1; i < i = 1; i--) cout < < i; (a) What is the output when n = 2, n = 4, and n = 6? (b) What is the time complexity T(n)? You may assume that the input...
-
What does it mean to have optimum health, physically, mentally, spiritually? Are you at your optimum health? If not, why not?
-
a. Show that the expansion of q(x) in ascending powers of x can be approximated to 10 2x + Bx 2 + Cx 3 where B and C are constants to be found. b. Find the percentage error made in using the series...
-
A newspaper recently lowered its price from $5.00 to $3.00. As it did, the number of newspapers sold increased from 240,000 to 280,000. a. What was the newspapers elasticity of demand? b. Given that...
-
Suppose average movie ticket prices are $8.50 and attendance is 1.2 billion. The price of tickets rises to $9.50 and attendance rises to 1.4 billion. a. What happened to total revenue? b. If you were...
-
Which of the following producers would you expect to support a tax on beer? Which would not? Explain your answer. a. Producers of hard liquor. Cross-price elasticity with beer: 0.11. b. Producers of...
Study smarter with the SolutionInn App