Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DECLARE @return INT --#1. DROP ALL THE FOREIGN KEYS PRIOR TO TRUNCATING TABLES IN THE STAR SCHEMA EXEC [BIClassProject2].[DropForeignKeysFromStarSchemaData]; --#2. Check row count before truncation

DECLARE @return INT

--#1. DROP ALL THE FOREIGN KEYS PRIOR TO TRUNCATING TABLES IN THE STAR SCHEMA

EXEC [BIClassProject2].[DropForeignKeysFromStarSchemaData];

--#2. Check row count before truncation

EXEC [BIClassProject2].[ShowTableStatusRowCount]

@TableStatus = N'''Pre-Truncate of table '''

--#3. Always Truncate the Star Schema Database

EXEC [BIClassProject2].[TruncateStarSchemaData];

--#4 Load the star Schema

EXEC [CH01-01-Dimension].[DimProductSubcategory];

EXEC [CH01-01-Dimension].[DimProductSubcategory];

EXEC [CH01-01-Dimension].[DimProduct];

EXEC [CH01-01-Dimension].[SalesManagers];

EXEC [CH01-01-Dimension].[DimGender];

EXEC [CH01-01-Dimension].[DimMaritalStatus];

EXEC [CH01-01-Dimension].[DimOccupation];

EXEC [CH01-01-Dimension].[DimOrderDate];

EXEC [CH01-01-Dimension].[DimTerritory];

EXEC [CH01-01-Dimension].[DimCustomer];

EXEC [CH01-01-Fact].[Data];

--#5 Recreate all of the foreign keys prior after loading the star schema

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

Knowledge Discovery In Databases

Authors: Gregory Piatetsky-Shapiro, William Frawley

1st Edition

0262660709, 978-0262660709

More Books

Students also viewed these Databases questions