Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started