Perform the following functions using the following commands on the tables created(see tables below) 2. Paste SQL and results for each. For the UPDATE command perform Select * and provide screenshot of the results.   Explain in at least 'one' sentence the business problem statement for 'each' of these queries.   Please do not use all these commands on similar tables. You need to diversify so that all your tables get involved in this assignment.     1.   UPDATE using WHERE (ampersand (&) in the clause) - 2.   SELECT using ROUND function - 3.   NON-EQUALITY join of two tables using the JOIN...ON - 4.   OUTER JOIN of two tables (LEFT or RIGHT join) - 5.   Create a new table (copy of existing table from your project) - then UPDATE one of row of the table and perform MERGE to keep them in sync -

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Perform the following functions using the following commands on the tables created(see tables below) 2. Paste SQL and results for each. For the UPDATE command perform Select * and provide screenshot of the results.

 

Explain in at least 'one' sentence the business problem statement for 'each' of these queries.

 

Please do not use all these commands on similar tables. You need to diversify so that all your tables get involved in this assignment.  

 

1.   UPDATE using WHERE (ampersand (&) in the clause) -

2.   SELECT using ROUND function -

3.   NON-EQUALITY join of two tables using the JOIN...ON -

4.   OUTER JOIN of two tables (LEFT or RIGHT join) -

5.   Create a new table (copy of existing table from your project) - then UPDATE one of row of the table and perform MERGE to keep them in sync -

 

My tables:

CREATE TABLE product_order_tbl (

  order_num CHAR(9) NOT NULL,

  product_no VARCHAR2(3) NOT NULL,

  product_description VARCHAR2(21) NOT NULL,

  product_unit_price NUMBER(5,2) NOT NULL,

  CONSTRAINT orderproduct_num_CK PRIMARY KEY (order_num, product_no)

);

 

CREATE TABLE product_info (

  product_no VARCHAR2(3) NOT NULL,

  product_description VARCHAR2(21) NOT NULL,

  CONSTRAINT product_no_pk PRIMARY KEY (product_no)

);

 

CREATE TABLE customer_tbl (

  customer_name VARCHAR2(10) NOT NULL,

  billing_address VARCHAR2(14) NOT NULL,

  billing_zip CHAR(5) NOT NULL,

  billing_city VARCHAR2(8) NOT NULL,

  CONSTRAINT customer_name_pk PRIMARY KEY (customer_name)

);

 

CREATE TABLE order_info (

  order_num VARCHAR(9),

  order_date DATE NOT NULL,

  customer_name VARCHAR2(10) NOT NULL,

  order_address VARCHAR2(30) NOT NULL,

  order_city VARCHAR2(9) NOT NULL,

  order_zip CHAR(5) NOT NULL,

  CONSTRAINT order_pk PRIMARY KEY (order_num),

  CONSTRAINT customer_name_fk FOREIGN KEY (customer_name) REFERENCES customer_tbl(customer_name)

);

 

SUBJECT: MYSQL

3NF
Order_Info
Customer_Name (FK) Order_address
Order _Num
2312/2019
Order_date
Order_city
Order_zip
11/2/2019
John Smith
3787 Pineview Dr
Cambridge
12210
Customer TBL
Billing address
2 Court Square
Customer Name
Billing_Zip
Billing_City
John Smith
12210
New York
Product Order TBL
Product_Info
Product No
Order _Num
2312/2019
2312/2019
2312/2019
Product_No
001
002
Product_description
Product Unit Price
Product_description
001
Front and rear cables 100
Front and rear cables
002
New set pedal arms
15
New set pedal arms
003
Labor 3HRS
5
[003
Labor 3HRS
Transcribed Image Text:3NF Order_Info Customer_Name (FK) Order_address Order _Num 2312/2019 Order_date Order_city Order_zip 11/2/2019 John Smith 3787 Pineview Dr Cambridge 12210 Customer TBL Billing address 2 Court Square Customer Name Billing_Zip Billing_City John Smith 12210 New York Product Order TBL Product_Info Product No Order _Num 2312/2019 2312/2019 2312/2019 Product_No 001 002 Product_description Product Unit Price Product_description 001 Front and rear cables 100 Front and rear cables 002 New set pedal arms 15 New set pedal arms 003 Labor 3HRS 5 [003 Labor 3HRS
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Multiple table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education