Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am confused about how to do part 4. how to insert table product type into the product. when I desc product show product type,

image text in transcribed

I am confused about how to do part 4. how to insert table product type into the product. when I desc product show product type, but when I use select * from the said empty set.

Could you explain a couple of questions over here?

4. Insert into table productType column type distinct values from column productType from table product 5. Insert into table cityState columns city, state and zip Code distinct values from columns city, state and zipCode from table customer 6. Insert into table cityState columns city, state and zipCode distinct values from columns city, state and zipCode from table employee 7. Insert into table cityState columns city, state and zip Code distinct values from columns city, state and zip Code from table supplier 8. Update table product to set the value of column productType equal to the corresponding id value in the table productType. This requires a SELECT * FROM productType; to see what the id value is for each type. For example, in my database a. 1 meat b. 2 seafood c. 3 vegetable d. 4 grain and rice e. 5 bakery 9. Alter table product so that column productType is an integer instead of a varchar, not null should be maintained. 10. Alter table product so that column productType is a foreign key to table productType, column id 11. Alter table customer so that column zipCode is a foreign key to table cityState, column zip Code 12. Alter table customer to drop column city and state 13. Alter table employee so that column zipCode is a foreign key to table cityState, column zipCode 14. Alter table employee to drop column city and state 15. Alter table supplier so that column zip Code is a foreign key to table cityState, column zipCode 16. Alter table supplier to drop column city and state

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

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions

Question

What did they do? What did they say?

Answered: 1 week ago