Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Each part should have screenshot and SQL code. I am providing part 1-4 to help answer part 4-6. I do not need answers for 1-4,

image text in transcribed

Each part should have screenshot and SQL code. I am providing part 1-4 to help answer part 4-6. I do not need answers for 1-4, just for 4-6.

Part 1: Identify primary and foreign keys. Create tables. Do not forget about primary and foreign keys. Provide SQL code and screenshot of DESC statements.

Part 2: Insert data. Provide SQL code and screenshot of select statements.

Part 3: Suppose you wanted quick lookup capability to get a listing of all products supplied by a given vendor. Which table would be the basis for the INDEX table, and what would be the index key? Create the index. Provide SQL code.

---------------------------------------------------------------------------------------------------------------------------------------------------

Part 4: Create a view that lists all products in alphabetical order and their vendors. Select all rows from the view and provide a screenshot.

Part 5: Find all products that were manufactured between February 15 and April 15, 2018. Provide SQL code and the screenshot of the result.

Part 6: Delete vendor AmeriMart form Vendor table. Provide SQL code and the result of select statement for both tables before deletion and after deletion. If you still have bed, dresser and chair in your product table, go back to #3 and fix foreign keys.

Suppose you have two tables: Table Product: PROD ID PROD NAME PROD PRICE PROD PROD DATE PROD VENDOR 1101 Table 1102 Chair 1103 Armchair 1104 | Nightstand 1105 Bed 1106 Dresser 1107 Daybed 100 80 90 110 200 150 190 1-Jan-18 3-Mar-18 6-May-18 4-Apr-18 3-Mar-18 5-May-18 10-Feb-18 2 2 2 Table Vendor VEND ID VEND NAME VEND ST 1 Green Way IncGA 2 Forrest LLC 3 AmeriMart NC NC

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions