3. Consider the following schema: Suppliers (sid: integer, sname: string, address: string) Parts (pid: integer, pname:...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
3. Consider the following schema: Suppliers (sid: integer, sname: string, address: string) Parts (pid: integer, pname: string, color: string) Catalog (sid: integer, pid: integer, cost: real) The Catalog relation lists the prices charged for parts by suppliers. Write the following queries in SQL (40 pts): a.) Find the pnames of parts for which there is some supplier. b.) For each part, find the sname of the supplier who charges the most for that part. c.) Find the sids of suppliers who supply only red parts. d.) Find the snames of suppliers who supply every part. 3. Consider the following schema: Suppliers (sid: integer, sname: string, address: string) Parts (pid: integer, pname: string, color: string) Catalog (sid: integer, pid: integer, cost: real) The Catalog relation lists the prices charged for parts by suppliers. Write the following queries in SQL (40 pts): a.) Find the pnames of parts for which there is some supplier. b.) For each part, find the sname of the supplier who charges the most for that part. c.) Find the sids of suppliers who supply only red parts. d.) Find the snames of suppliers who supply every part.
Expert Answer:
Answer rating: 100% (QA)
a To find the pnames of parts for which there is some supplier we can use the following SQL query SE... View the full answer
Related Book For
Database management systems
ISBN: 978-0072465631
3rd edition
Authors: Raghu Ramakrishan, Johannes Gehrke, Scott Selikoff
Posted Date:
Students also viewed these programming questions
-
The Suppliers relation describes suppliers of parts. The Parts relation contains information about each part. The Catalog relation lists the prices in dollars charged for parts by suppliers. (The...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
What are the advantages and disadvantages of Qantass international cooperative alliances? The Qantas Group maintained its strong position in the Australian domestic market in 2016/17. Through a dual...
-
Insert , or = between each pair of numbers to make a true statement. 1. 0.49 0.43 2. 0.973 0.9730 3. -38.0027 -38.00056 4. -0.230505 0.23505
-
The rate at which a new worker in a certain factory produces items is given by where y is the number of items produced by the worker per day, x is the number of days worked, and the maximum...
-
A hemispherical bowl of radius \(R\) is placed in a uniform magnetic field that has magnitude \(B_{0}\) and is in the positive \(z\) direction. The open top of the bowl is in the \(x y\) plane....
-
X-treme Vitamin Company is considering two investments, both of which cost $10,000. The cash flows are as follows: a. Which of the two projects should be chosen based on the payback method? b. Which...
-
Draw energy band diagram for a MOS structure in thermal equilibrium with (a). P-type semiconductor. Use4 , 3.5 , 1.0m sc Gq eV q eV E eV = = = and calculate VFB. Estimate the required applied voltage...
-
The beginning inventory of merchandise at Dunne Co. and data on purchases and sales for a three-month period ending June 30 are as follows: Instructions 1. Record the inventory, purchases, and cost...
-
Using the grandcanonical ensemble for a system of constant volume in contact with a heat bath and a particle bath prove the fluctuations in the number of molecules is related to the isothermal...
-
Given the following: Given the following LSystem example Axiom : X Angle: 90 Iteration : 3 Length: 80 Rules: rule1: X->F[X]-F-F[++X]-F, rule 2: F->FF Write java code using Turtle class and recursion...
-
INSTRUCTIONS For this assignment, you will create an Excel document to perform ratio analysis and explain the significance of financial ratios in evaluating a company's financial performance. Follow...
-
1. Provide the accounting equation. 2. Define each of the three individual components of the accounting equation. (Do not just list, but tell me what they represent.) 3. Prepare a simplified balance...
-
Abby found a roll of fabric. The fabric is 36 inches wide and 23 feet 3 inches long. He needs to cut four 1-yard-wide sections from this roll. The length of those sections are 5 2/3 ft., 4 7/8 ft., 5...
-
Cell Phone Survey Data Cell Phone Service Gender Provider M M M M M M M F F M M M M F F M F M F M M M F F M Verizon Verizon AT&T AT&T AT&T AT&T M AT&T F AT&T M F F M F M F M F M AT&T AT&T AT&T M AT&T...
-
Ethel is drafting her will and she discusses charitable giving with Anna, her insurance agent. She has always supported the local cancer research foundation. Having no next of kin, Ethel would like...
-
The Zwatch Company manufactures trendy, high-quality moderately priced watches. As Zwatch's senior financial analyst, you are asked to recommend a method of inventory costing. The CFO will use your...
-
Consider a database with objects X and Y and assume that there are two transactions T1 and T2. Transaction T1 reads objects X and Y and then writes object X. Transaction T 2 reads objects X and Y and...
-
Answer the following questions 1. Prove that the algorithm shown in Figure 19.4 correctly computes the attribute closure of the input attribute set X. 2. Describe a linear-time (in the size of the...
-
Briefly answer the following questions: 1. Draw a Venn diagram that shows the inclusions between the classes of schedules permitted by the following concurrency control protocols: 2PL, Strict 2PL,...
-
What is a joint cost?
-
Flori-Dante Srl grows, processes, packages and sells three joint apple products: (a) sliced apples that are used in frozen pies, (b) apple sauce, and (c) apple juice. The apple peel, processed as...
-
Flori-Dante classifies animal feed as a by-product. The by-product is inventoried at its selling price when produced; the net realisable value of the product is used to reduce the joint production...
Study smarter with the SolutionInn App