Consider the relational schema given in Figure 1. Read the description, and write the SQL statement...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the relational schema given in Figure 1. Read the description, and write the SQL statement to answer the sub-questions. Customer (id, name, city, credit card) Merchant (id, name, city, account) Merchant-Phone (id, phone) Handling-Fee (product id, handling rate, description) Purchase (purchase id, time, date, customer_id) Product (product_id, description, price, merchant_id) Consist (purchase id, product_id, quantity) Figure 1: Product -Purchase tracking a) Identify the foreign keys in this schema. (6 marks) b) Display the customer's id for all customer who have purchased product on "T0/06/2019" or on "11/06/2019". (8 marks) c) For each merchant, display the id and total amount of money that its products cost (disregarding handling fees), under the condition that the total amount is greater than 500. The result should be ordered in descending order of the total amount. (6 marks) Activate Window Consider the relational schema given in Figure 1. Read the description, and write the SQL statement to answer the sub-questions. Customer (id, name, city, credit card) Merchant (id, name, city, account) Merchant-Phone (id, phone) Handling-Fee (product id, handling rate, description) Purchase (purchase id, time, date, customer_id) Product (product_id, description, price, merchant_id) Consist (purchase id, product_id, quantity) Figure 1: Product -Purchase tracking a) Identify the foreign keys in this schema. (6 marks) b) Display the customer's id for all customer who have purchased product on "T0/06/2019" or on "11/06/2019". (8 marks) c) For each merchant, display the id and total amount of money that its products cost (disregarding handling fees), under the condition that the total amount is greater than 500. The result should be ordered in descending order of the total amount. (6 marks) Activate Window Consider the relational schema given in Figure 1. Read the description, and write the SQL statement to answer the sub-questions. Customer (id, name, city, credit card) Merchant (id, name, city, account) Merchant-Phone (id, phone) Handling-Fee (product id, handling rate, description) Purchase (purchase id, time, date, customer_id) Product (product_id, description, price, merchant_id) Consist (purchase id, product_id, quantity) Figure 1: Product -Purchase tracking a) Identify the foreign keys in this schema. (6 marks) b) Display the customer's id for all customer who have purchased product on "T0/06/2019" or on "11/06/2019". (8 marks) c) For each merchant, display the id and total amount of money that its products cost (disregarding handling fees), under the condition that the total amount is greater than 500. The result should be ordered in descending order of the total amount. (6 marks) Activate Window Consider the relational schema given in Figure 1. Read the description, and write the SQL statement to answer the sub-questions. Customer (id, name, city, credit card) Merchant (id, name, city, account) Merchant-Phone (id, phone) Handling-Fee (product id, handling rate, description) Purchase (purchase id, time, date, customer_id) Product (product_id, description, price, merchant_id) Consist (purchase id, product_id, quantity) Figure 1: Product -Purchase tracking a) Identify the foreign keys in this schema. (6 marks) b) Display the customer's id for all customer who have purchased product on "T0/06/2019" or on "11/06/2019". (8 marks) c) For each merchant, display the id and total amount of money that its products cost (disregarding handling fees), under the condition that the total amount is greater than 500. The result should be ordered in descending order of the total amount. (6 marks) Activate Window Consider the relational schema given in Figure 1. Read the description, and write the SQL statement to answer the sub-questions. Customer (id, name, city, credit card) Merchant (id, name, city, account) Merchant-Phone (id, phone) Handling-Fee (product id, handling rate, description) Purchase (purchase id, time, date, customer_id) Product (product_id, description, price, merchant_id) Consist (purchase id, product_id, quantity) Figure 1: Product -Purchase tracking a) Identify the foreign keys in this schema. (6 marks) b) Display the customer's id for all customer who have purchased product on "T0/06/2019" or on "11/06/2019". (8 marks) c) For each merchant, display the id and total amount of money that its products cost (disregarding handling fees), under the condition that the total amount is greater than 500. The result should be ordered in descending order of the total amount. (6 marks) Activate Window Consider the relational schema given in Figure 1. Read the description, and write the SQL statement to answer the sub-questions. Customer (id, name, city, credit card) Merchant (id, name, city, account) Merchant-Phone (id, phone) Handling-Fee (product id, handling rate, description) Purchase (purchase id, time, date, customer_id) Product (product_id, description, price, merchant_id) Consist (purchase id, product_id, quantity) Figure 1: Product -Purchase tracking a) Identify the foreign keys in this schema. (6 marks) b) Display the customer's id for all customer who have purchased product on "T0/06/2019" or on "11/06/2019". (8 marks) c) For each merchant, display the id and total amount of money that its products cost (disregarding handling fees), under the condition that the total amount is greater than 500. The result should be ordered in descending order of the total amount. (6 marks) Activate Window
Expert Answer:
Answer rating: 100% (QA)
Based on the provided relational schema in Figure 1 here are the SQL statements that correspond to t... View the full answer
Related Book For
Fundamentals of Database Systems
ISBN: 978-0136086208
6th edition
Authors: Ramez Elmasri, Shamkant Navathe
Posted Date:
Students also viewed these programming questions
-
The Crazy Eddie fraud may appear smaller and gentler than the massive billion-dollar frauds exposed in recent times, such as Bernie Madoffs Ponzi scheme, frauds in the subprime mortgage market, 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...
-
Aoslia is a small country that takes the world price of corn as given. Its domestic supply and demand for corn are given by the following: a. Assume initially that Aoslia does not open to trade. What...
-
Go to the Web site of the Federal Reserve Bank of St. Louis (FRED) (research.stlouisfed.org/fred2/) and find the most recent values for the following four variables: (1) M2 Money Stock (M2), (2) the...
-
What are the properties of the t distribution?
-
The finalists can be viewed at http://www .sciencemag.org/projects/data-stories/finalists. Pick a video that interests you, watch it, and answer the following questions: (a) Give a link to the chosen...
-
Gatti Corporation reported the following balances at June 30. Required: 1. What amount should be reported as "Cash and Cash Equivalents"? 2. Prepare a classified balance sheet. Do not show the...
-
The following data pertain to ABC Company (assume a perpetual inventory system) for the month ended January 31, 2019: Date Description Units Unit Cost Unit Selling Price Jan.1 Beg. Inventory 5...
-
Naboni was established in 1996 by Mr. Nicholas Menyani following a decision by the government of Zambia to liberalize the Zambian economy. Prior to 1991, the Zambian economy had been dominated by...
-
Think about a time when you experienced a cultural collision as a result of miscommunication (or another example that you are aware of). How did the different cultures (people) attempt communicate...
-
In 1956 Artur Frost wells could serve as a model for diatomic molecules: suggested that two Dirac delta V(x) = -a [8(x-a/2) +8(x+a/2)]. (a) Sketch the potential (just a sketch, no need to do a...
-
. BALANCE SHEET AS AT 30 JUNE 2022 $ CURRENT ASSETS Cash on Hand Cash at Bank Receivables NON CURRENT ASSETS Property, Plant & Equipment less Accumulated depreciation INTANGIBLES Patents & Designs...
-
7 Skipped eBook References b. Prepare journal entries (including any adjusting entry as of the end of the month) to record these items using the procedure of initially crediting the Revenue account...
-
(b) Sketch carefully proportioned qualitative graphs of nm, nfis nv,and (F/A)/(F/A)stoich versus speed N at full load, and explain the reasons for the shapes of the curves. Then explain why the...
-
P(t) = Plot the displacement of point A when 0 t 0.01s t> 0.01s {1000 (N) (harmonic response) Plot the displacement of point A when P(t) = 1000sin (27 (20)t) (N) (step function) Plot the displacement...
-
1. Alta Vista Company operates a water and radio broadcasting franchise that provides the following in 2018:Gross receipts Water franchise P 2,000,000Radio franchise 10,000,000Operating expenses...
-
Describe basic managerial approaches to implementing controls and how these are implemented.
-
Repeat Exercise 21.14 adding a check in T 1 so that Y does not exceed 90. In exercise 21.14 Change transaction T 2 in Figure 21.2b to read: read_item(X); X:= X+M; if X > 90 then exit else...
-
Prove that any relation schema with two attributes is in BCNF.
-
Apply the FP-growth algorithm to the FP tree from Exercise 28.17 and show the frequent item sets.
-
Comment on this statement: Dynamic modeling is about interaction.
-
Explain how objects interact by exchanging messages.
-
Describe the relationship between dynamic modeling, behavioral modeling, and structural modeling.
Study smarter with the SolutionInn App