Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4) Using PL/SQL stored procedure populate the SALES_FACTS table. One way to do this is to use four nested cursor loops to get every possible

4) Using PL/SQL stored procedure populate the SALES_FACTS table. One way to do this is to use four nested cursor loops to get every possible combination of the dimension tables primary keys and then the total vehicles sold and gross sales amount for each combination. If these values for 2 Total_Vehicles_Sold and Gross_Sales_Amount for a combination are zero then dont INSERT a row into the SALES_FACT table. Only insert rows for combinations of the four foreign key columns where there were some vehicles sold. Another approach besides nested cursor loops is to use a single INSERT statement with a GROUP BY clause. After populating your SALES_FACTS table execute the query SELECT COUNT(*) FROM sales_facts; to show the row count. Also execute the query SELECT SUM(vehicles_sold) FROM sales_facts; to ensure that you have included all of your 200 or more sales.

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_2

Step: 3

blur-text-image_3

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

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions