Question: An idea of the code would do - I can make the necessary changes. 9. Please do the following steps to normalize the data in
An idea of the code would do - I can make the necessary changes.
9. Please do the following steps to normalize the data in the dbo.WineRating table.
A. Write the syntax to DROP and CREATE four tables in the following order: dbo.Store, dbo.Variety, dbo.Type, dbo.Wine.
The relationships among these four tables are described in the attached relational schema. NO NEED to include the foreign key constraints for the Wine table.
B. You need to populate data to dbo.Store, dbo.Variety, and dbo.Type from the dbo.WineRating table.
9C. Please execute the following code to populate data to the dbo.Wine table. Please change the code accordingly if you use different schema names or column names
INSERT INTO dbo.Wine (TypeID , VarietyID , StoreID , WineName , Cost , Review , ReviewDate , TasteRating , ValueRating , OverallRating) SELECT TypeID , VarietyID , StoreID , WineName , Cost , Review , ReviewDate , TasteRating , ValueRating , OverallRating FROM dbo.WineRating WR INNER JOIN dbo.Type T on T.Type = WR.Type INNER JOIN dbo.Variety V on V.Variety = WR.Variety INNER JOIN dbo.Store S on S.Store = WR.Store
10. Using the new tables and JOINs to display all information in the dbo.WineRating table. (If possible this too)
Thanks!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
