2. [9 points] There are six tables describing a company, describing employees, departments, buildings, which department(s)...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
2. [9 points] There are six tables describing a company, describing employees, departments, buildings, which department(s) an employee works in (and a percentage of the time for each), department managers (possibly more than one per department), and in which building an employee works (an employee may have more than one office). The primary key of each table is the attribute(s) in capitals. Other attributes are not necessarily unique. EID 001 002 003 004 005 EMP-100,000 tuples, 1,000 pages EName Jane $124,000 $32,000 $99,000 Joe $55,000 Jenny $51,000 EID values range from 1 to 100,000 Jim John Salary Start Date End Date BUILDING-2,000 tuples, 10 pages Address BID 201 202 203 DID 101 102 103 3/1/93 null null 2/29/96 12/12/98 null 2/2/92 null 5/5/95 null BName ATC 1600 Ampitheatre CCC 500 Crittenden MFB 123 Shoreline BID values range from 1 to 2,000 DEPT-1,000 tuples, 5 pages Annual Budget $1,001,000 $500,000 $2,000,000 DName Research Development Sales DID values range from 1 to 1000 IN DEPT-110,000 tuples, 550 pages EID Percent_Time 100 100 60 40 100 100 001 002 003 003 004 005 IN BUILDING -110.000 tuples, 550 pages EID BID 001 201 002 201 003 003 DID 101 102 101 102 103 103 004 005 202 203 202 203 MANAGES DEPT-800 tuples, 4 pages EID DID 003 003 001 101 102 103 (1) Which of the following queries finds the names of buildings where more than 50 employees work? In this box list which of a, b, c, d, e is correct (you may list multiple answers) a. b. C. d. e. SELECT Bname FROM IN BUILDING GROUP BY BID WHERE Count(*) > 50 SELECT Bname FROM BUILDING WHERE BID IN (SELECT BID FROM In Building GROUP BY BID HAVING Count(*) > 50) SELECT Bname FROM Building B, In Building I WHERE B.BID = I.BID GROUP BY B.BID HAVING Count(*) > 50 SELECT Bname FROM Building B WHERE 50 < (SELECT Count(*) FROM In Building I WHERE I.BID = B.BID) None of the above 2. [9 points] There are six tables describing a company, describing employees, departments, buildings, which department(s) an employee works in (and a percentage of the time for each), department managers (possibly more than one per department), and in which building an employee works (an employee may have more than one office). The primary key of each table is the attribute(s) in capitals. Other attributes are not necessarily unique. EID 001 002 003 004 005 EMP-100,000 tuples, 1,000 pages EName Jane $124,000 $32,000 $99,000 Joe $55,000 Jenny $51,000 EID values range from 1 to 100,000 Jim John Salary Start Date End Date BUILDING-2,000 tuples, 10 pages Address BID 201 202 203 DID 101 102 103 3/1/93 null null 2/29/96 12/12/98 null 2/2/92 null 5/5/95 null BName ATC 1600 Ampitheatre CCC 500 Crittenden MFB 123 Shoreline BID values range from 1 to 2,000 DEPT-1,000 tuples, 5 pages Annual Budget $1,001,000 $500,000 $2,000,000 DName Research Development Sales DID values range from 1 to 1000 IN DEPT-110,000 tuples, 550 pages EID Percent_Time 100 100 60 40 100 100 001 002 003 003 004 005 IN BUILDING -110.000 tuples, 550 pages EID BID 001 201 002 201 003 003 DID 101 102 101 102 103 103 004 005 202 203 202 203 MANAGES DEPT-800 tuples, 4 pages EID DID 003 003 001 101 102 103 (1) Which of the following queries finds the names of buildings where more than 50 employees work? In this box list which of a, b, c, d, e is correct (you may list multiple answers) a. b. C. d. e. SELECT Bname FROM IN BUILDING GROUP BY BID WHERE Count(*) > 50 SELECT Bname FROM BUILDING WHERE BID IN (SELECT BID FROM In Building GROUP BY BID HAVING Count(*) > 50) SELECT Bname FROM Building B, In Building I WHERE B.BID = I.BID GROUP BY B.BID HAVING Count(*) > 50 SELECT Bname FROM Building B WHERE 50 < (SELECT Count(*) FROM In Building I WHERE I.BID = B.BID) None of the above
Expert Answer:
Answer rating: 100% (QA)
a SELECT Bname FROM IN BUILDING GROUP BY BID HAVING COUNT 50 ... View the full answer
Related Book For
Statistics The Exploration & Analysis Of Data
ISBN: 9780840058010
7th Edition
Authors: Roxy Peck, Jay L. Devore
Posted Date:
Students also viewed these programming questions
-
The standard deviation of the time for the delay of trains in a country is known as 34 minutes. What is the minimum sample size required to find the 99% confidence interval with the margin of error...
-
If we flip a coin 10 times, what percentage of the time will the coin land on heads? A first step to answering this question is to simulate 10 flips. Use the random number table in Appendix A to...
-
In problem 6.2, what percentage of the time is the order actually running? In problem 6.2 An order for 100 of a product is processed on work centers A and B. The setup time on A is 50 minutes, and...
-
For the beam illustrated in the figure, find the locations and magnitudes of the maximum tensile bending stress due to M and the maximum shear stress due toV. 4500 N 20 mm 300 mm 150 mm 40 mm
-
A firm sells goods with an average retail price of $550.00. Customers usually pay 60 days after the date of purchase. The per unit cost of producing the goods is $125.00. Assume the cost of borrowing...
-
Repeat Problem 128 for helium.
-
Parents of minors took Apple to court in 2012 for supplying game applications, on iPhones, that were free but through which users could purchase in-game currencies. Apparently, parents would log on...
-
Revenue and Related Transactions. During its current fiscal year, Dearborn General Hospital, a not-for-profit health care organization, had the following revenue-related transactions (amounts...
-
Why does flexibility in NoSql make it easier? What is an example.
-
Lou and Joann Girardi are married and file a joint return. They recently bought a new home on 21680 Skyline Drive, Henderson, NV 89077. Their son, Stuart, attends the University of Pennsylvania...
-
6. (20 Points) Write a lisp function (square-list L) that squares all the integer members in a list L and return the result. '(1 2 3 4 5)) '()) '(4 4 4)) > (square-list (1 4 9 16 25) > (square-list...
-
Suppose the market demand curve for a monopolist is P = 1 0 0 - Q . The marginal cost is constant MC = $ 2 0 ( = AVC ) . The fixed cost TFC = $ 1 0 0 . How much is the profits of the firm? You must...
-
Specifically, use the trapezoid rule to approximate the definite integral of f(x)=e^x from 1 to 9, using n=1,2,4,8 intervals, and arrange your answers as the first column of a table. Use the general...
-
The demand functions for Q and Q are and there are 5 units of Q and 2 units of Q2 What is the general equilibrium? The general equilibrium is where P = $ Q = 10-8p +4p2 and Q2-10-802 +4 +4P P = $and...
-
Show that 1+2+z+...+ 2n = and deduce that 1-n+1 1-z 1 + cos 0 + cos 20 + + cos no - 1 2 for any complex number z except z = 1, sin[(n + 1)0] 2 sin (2) + 3 0 < 0 < 2T.
-
So, what do you do? Let's assume you can't charge riders more, and you're tasked with maximizing the company's total net revenue for Toledo for the first 12 months after launch. The core question is:...
-
Find the production schedule for the technology matrix and demand vector given below: 1 X = A = 0.2 0.1 0 0.6 0.4 0.1 0.3 1 0.8 D = 68 48 90
-
You are a U.S. investor who purchased British securities for 2,000 one year ago when the British pound cost U.S. $1.50. What is your total return (based on U.S. dollars) if the value of the...
-
The article Feasting on Protein (AARP Bulletin, September 2009) gave the cost per gram of protein for 19 common food sources of protein. a. Construct a dotplot of the cost-per-gram data. b. Locate...
-
A manufacturer of small appliances purchases plastic handles for coffeepots from an outside vendor. If a handle is cracked, it is considered defective and must be discarded. A large shipment of...
-
The interval from 2.33 to 1.75 captures an area of .95 under the z curve. This implies that another large- sample 95% confidence interval for m has lower limit and upper limit Would you recommend...
-
Using an economic balance sheet, which of the Laws current financial assets is most concerning from an asset allocation perspective? A. Equities B. Real estate C. Fixed income Raye uses a costbenefit...
-
Using the economic balance sheet approach, the Laws economic net worth is closest to: A. $925,000. B. $1,425,000. C. $1,675,000. Raye uses a costbenefit approach to rebalancing and recommends that...
-
Raye believes the previous advisers asset class specifications for equity and derivatives are inappropriate given that, for purposes of asset allocation, asset classes should be: A. diversifying. B....
Study smarter with the SolutionInn App