In this task you must operate on the original state of a sample benchmark TPC-HR database....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
In this task you must operate on the original state of a sample benchmark TPC-HR database. It is explained at the end of Prologue section how to return to the original state of the database. Consider the following SELECT statements. (1) SELECT O_ORDERKEY, O_ORDERDATE, C_CUSTKEY FROM ORDERS LEFT OUTER JOIN CUSTOMER (2) SELECT * FROM PART ON ORDERS.O_CUSTKEY CUSTOMER.C_CUSTKEY; WHERE P_PARTKEY = 101 INTERSECT SELECT * FROM PART WHERE P_NAME = 'bolt'; (3) SELECT P_NAME FROM PART P WHERE (SELECT COUNT(*) FROM PART WHERE P.P_PARTKEY PART.P_PARTKEY) > 5; (4) SELECT C_NAME, C_ADDRESS FROM CUSTOMER WHERE C_NAME = (SELECT DISTINCT C_NAME FROM CUSTOMER WHERE C_NAME = 'James'); (5) SELECT DISTINCT C_CUSTKEY, C_NAME FROM CUSTOMER CROSS JOIN ORDERS; An objective of this task is to rewrite each one of the statements listed below into an equivalent SELECT statement and such that its processing costs are lower than the processing costs of the original SELECT statement. Implement SQL script solution3.sql that performs the following actions. (1) First, the script finds the query processing plans for each one of SELECT statements listed above. Use SQL script showplan.sql to list the processing plans. (2) Next, the script finds query processing plans the improved SELECT statements such that the processing costs of each improved statement are lower than the processing costs of the original one. Use SQL script showplan.sql to list the processing plans. When processing an improved SQL script solution3.sql you must put the following SQLC1 statements SPOOL solution3 SET ECHO ON SET FEEDBACK ON SET LINESIZE 300 SET PAGESIZE 300 at the beginning of each SQL script implemented and the following statement at the end of the script SPOOL OFF A report from processing of the script must have NO syntax errors! The script must be processed with SQLC1 options ECHO and FEEDBACK set to ON such that all SQL statements processed are included in the report! A report from processing of the script must have NO syntax errors ! Deliverables A file solution 3.1st that contains a report from the processing of a script solution3.sql. In this task you must operate on the original state of a sample benchmark TPC-HR database. It is explained at the end of Prologue section how to return to the original state of the database. Consider the following SELECT statements. (1) SELECT O_ORDERKEY, O_ORDERDATE, C_CUSTKEY FROM ORDERS LEFT OUTER JOIN CUSTOMER (2) SELECT * FROM PART ON ORDERS.O_CUSTKEY CUSTOMER.C_CUSTKEY; WHERE P_PARTKEY = 101 INTERSECT SELECT * FROM PART WHERE P_NAME = 'bolt'; (3) SELECT P_NAME FROM PART P WHERE (SELECT COUNT(*) FROM PART WHERE P.P_PARTKEY PART.P_PARTKEY) > 5; (4) SELECT C_NAME, C_ADDRESS FROM CUSTOMER WHERE C_NAME = (SELECT DISTINCT C_NAME FROM CUSTOMER WHERE C_NAME = 'James'); (5) SELECT DISTINCT C_CUSTKEY, C_NAME FROM CUSTOMER CROSS JOIN ORDERS; An objective of this task is to rewrite each one of the statements listed below into an equivalent SELECT statement and such that its processing costs are lower than the processing costs of the original SELECT statement. Implement SQL script solution3.sql that performs the following actions. (1) First, the script finds the query processing plans for each one of SELECT statements listed above. Use SQL script showplan.sql to list the processing plans. (2) Next, the script finds query processing plans the improved SELECT statements such that the processing costs of each improved statement are lower than the processing costs of the original one. Use SQL script showplan.sql to list the processing plans. When processing an improved SQL script solution3.sql you must put the following SQLC1 statements SPOOL solution3 SET ECHO ON SET FEEDBACK ON SET LINESIZE 300 SET PAGESIZE 300 at the beginning of each SQL script implemented and the following statement at the end of the script SPOOL OFF A report from processing of the script must have NO syntax errors! The script must be processed with SQLC1 options ECHO and FEEDBACK set to ON such that all SQL statements processed are included in the report! A report from processing of the script must have NO syntax errors ! Deliverables A file solution 3.1st that contains a report from the processing of a script solution3.sql.
Expert Answer:
Related Book For
Posted Date:
Students also viewed these databases questions
-
In this task you must operate on the original state of a sample benchmark TPC-HR database. It is explained at the end of Prologue section how to return to the original state of the database. Consider...
-
Find I0 in the circuit using nodal analysis. WW- Io 2kQ SkQ 10 mA 2kQ
-
What is the "real" exchange rate, and why are changes in it more important in macroeconomic analyses than changes in the nominal exchange rate?
-
Factor the expression. 6x3/218x1/2 + 12x-1/2
-
Compare the rms signal-to-(self) noise ratios achievable using amplitude interferometry and intensity interferometry to measure \(\mu_{12}\) under the assumption that \(T / \tau_{c} \gg 1 /...
-
Primara Corporation has a standard cost system in which it applies overhead to products based on the standard direct labor-hours allowed for the actual output of the period. Data concerning the most...
-
Banana Bay Corporation prepares financial statements under ASPE. On February 1, 2023, Banana received authorization to issue 400,000 no par value common shares. The following transactions occurred...
-
Your group is a team of demonstration assistants to a physics professor. She has an upcoming lecture this afternoon on capacitors, and asks your group to set up and test the apparatus shown in the...
-
What are the legislations for secured loans?
-
Imagine that you will open a restaurant that will follow the Differentiated Strategy. That is , high margins, based on the perceived market uniqueness of your products. Imagine that you will open a...
-
Q.1) You have to design a noninverting amplifier using LM741 op-amp. The upper critical frequency is 10 kHz. Refer to the figure shown below. Show how you will solve the problem of bias current. Draw...
-
Express in terms of logarithms without exponents. log (x7yz) What is the equivalent expression?
-
what are the hormonal and cellular mechanisms regulating gametogenesis, folliculogenesis, and spermatogenesis, and how do disruptions in these processes contribute to infertility and reproductive...
-
Answer the following questions: Define the terms "information technology" (it) and information systems (is) and explain their components and infrastructure. Why is it important for a manager to be...
-
Define the term utility software and give two examples.
-
What are the four subfields of anthropology?
-
To what extent do you think there is a link between the product cycle theory as developed by Vernon and the Linder theory? Explain.
-
The UK government has recognized the importance of information and behavioural economics to decision-making. The government partly funds the Behavioural Insights Team (BIT) in conjunction with an...
Study smarter with the SolutionInn App