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)...
-
For (u) = u + u2 / u, find each value. ( is the uppercase Greek letter phi.) (a) (1) (b) (-t) (c) (1/2) (d) (u + 1) (e) (x2) (f) (x2 + x)
-
Why might a private corporation opt to prepare its financial statements using IFRS?
-
Although not accompanied by an affidavit showing good cause, a subpoena that requests a nonparty to appear and testify at a deposition must be accompanied by witness fees and mileage costs, as set...
-
Gothic Architecture is a new chain of clothing stores specializing in the color black. Gothic issues 1,000 shares of its $1 par value common stock at $30 per share. Record the issuance of the stock....
-
4 THE COST OF CAPITAL AND CAPITAL STRUCTURE the corporation holding the common stock will earn after tax. The firm has earned before tax income of $153.85. Assume that a company borrows at a cost of...
-
Complete the following transactions assuming for month of August ASSUME 13% HST for necessary transactions 1. You purchase $100,000 of merchandise [1,000 units] on account from Techpower according to...
-
Assume that Water Source Inc. has been purchasing a component necessary for its final product for $360 a unit. The factory is currently operating at 80% capacity, and no major increase in production...
-
What is the implication of a married couple living apart for income splitting?
-
You and a co-worker are assisting a client in the shower. You go to the client's room to get her sweater. When you return, you enter the shower room and see your co-worker spraying the client in the...
-
What is the appropriate journal entry for default in payment? Explain.
-
Why is potential gross rent important to the investor's decision making process and give an example.
-
The motion of a particle is defined by the relation x = t 2 (t 2)3 , where x and t are expressed in feet and seconds, respectively. Determine ( a) the two positions at which the velocity is zero,...
-
Given find the value of k. es 1 e kx dx = 1 4'
-
Frank Willingham has the following transactions during the year: Sale of office equipment on March 15 that cost $20,000 when purchased on July 1, 2010. Frank has claimed $5,000 in depreciation and...
-
Deborah purchases a new $30,000 car in 2012 to use exclusively in her business. If Deborah does not elect to expense or take bonus depreciation in 2012 and holds the car until it is fully...
-
Professor Patricia (Patty) Pate is retired from the PalmSprings Culinary Arts Academy (PSCAA). She is a single taxpayer and is 68 years old. Patty lives at 98 Colander Street, Henderson, NV 89052....
-
Recording effects of transactions in T-accounts Record the transactions below for Amena Company by recording debit and credit amounts directly in the following T-accounts: Cash; Accounts Receivable;...
-
Identifying type and normal balances of accounts For each of the following (1) identify the type of account as an asset, liability, equity, revenue, or expense, (2) enter debit (Dr.) or credit (Cr.)...
-
Preparing a trial balance After recording the transactions of Exercise 3-2 in T-accounts and calculating the ending balance of each account, prepare a trial balance. Use May 31, 2008, as its report...
Study smarter with the SolutionInn App