Could you please help me on these MySQL questions (please don\'t resend answers
ID: 3714800 • Letter: C
Question
Could you please help me on these MySQL questions (please don't resend answers found in Chegg, they are WRONG). Please send me results if possible. Appreciate your help
Make the following changes to the Premiere Products database.
2. Define a view named PART_ORDER. It consists of the part number, description, price, order number, order date, number ordered, and quoted price for all order lines currently on file.
a. Write and execute the CREATE VIEW command to create the PART_ORDER view.
b. Write and execute the command to retrieve the part number, description, order number, and quoted price for all orders in the PART_ORDER view for parts with quoted prices that exceed $100.
c. Write and execute the query that the DBMS actually executes.
d. Type the answer to this question in the “write submission” area of the assignment in Blackboard: Does updating the database through this view create any problems? If so, what are they? If not, why not?
3. Define a new named ORDER_TOTAL. It consists of the order number and order total for each order currently on file. (The order total is the sum of the number of units ordered times the quoted price of each order line for each order.) Sort the rows by order number. Use TOTAL_AMOUNT as the name for the order total.
a. Write and execute the CREATE VIEW command to create the ORDER_TOTAL view.
b. Write and execute the command to retrieve the order number and order total for those orders totaling more than $1,000.
c. Write and execute the query that the DBMS actually executes.
d. Type the answer to this question in the “write submission” area of the assignment in Blackboard: Does updating the database through this view create any problems? If so, what are they? If not, why not?
4. Perform the following tasks:
a. Create an index named PART_INDEX1 on the PART_NUM column in the ORDER_LINE table.
b. Create an index named PART_INDEX2 on the CLASS column in the PART table.
c. Create an index named PART_INDEX3 on the CLASS and WAREHOUSE columns in the PART table. List item classes in descending order.
d. Delete the index named PART_INDEX3
MySQL Database file:
Explanation / Answer
2A)CRAETE VIEW PART_ORDER IS(SELECT
PART_NUM,DESCRIPTION,PRICE,ORDERNUMBER,ORDERDATE,NUMBER
ORDERED,QUOTEDPRICE FROM ORDER_LINE);
2B) SELECT PART_NUM,DESCRIPTION,ORDERNUMBER,QUOTEDPRICE
WHERE QUOTEDPRICE>=100;
2C) SELECT PART.PARTNUM, PART.DESCRIPTION, PART.PRICE, ORDERS.ORDER.NUM, ORDERLIINE.QUOTEDPRICE FROM PART INNER JOIN(ORDERS INNER JOIN ORDERLINE ON ORDERS.ORDERNUM = ORDERLINE.ORDERNUM) ON PART.PARTNUM=ORDQUOTEDPRICE>120)
2D) WE CAN UPDATE THE VALUES WHICH ARE RETRIVING THE VIEW, BUT
THE VALUES ARE EFFECTED ON MAIN TABLE ONLY.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.