Question: I need help inserting information into my dim and fact table. I cannot find the customer name, any help to fill and find. 2 .
I need help inserting
information into my dim and fact table. I cannot find the customer name, any help to fill and find. Creating Dimension Tables and Fact Table
Dimension Tables Creation
CREATE TABLE DimCustomer
CustomerID INT PRIMARY KEY,
CustomerName VARCHAR
;
CREATE TABLE DimProduct
ProductID INT PRIMARY KEY,
ProductName VARCHAR
;
CREATE TABLE DimSalesperson
SalespersonID INT PRIMARY KEY,
SalespersonName VARCHAR
;
CREATE TABLE DimTime
TimeID INT PRIMARY KEY,
Year INT,
Quarter INT,
Month INT,
;
Fact Table Creation
CREATE TABLE FactSales
SalesID INT PRIMARY KEY,
CustomerID INT,
ProductID INT,
SalespersonID INT,
TimeID INT,
SalesAmount DECIMAL
SalesYear INT,
SalesLastYear INT,
FOREIGN KEY CustomerID REFERENCES DimCustomerCustomerID
FOREIGN KEY ProductID REFERENCES DimProductProductID
FOREIGN KEY SalespersonID REFERENCES DimSalespersonSalespersonID
FOREIGN KEY TimeID REFERENCES DimTimeTimeID
;Schemas
Sales
Purchasing
Person
Production
HumanResources
dbo
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
