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. 2. Creating Dimension Tables and Fact Table
-- Dimension Tables Creation
CREATE TABLE DimCustomer (
CustomerID INT PRIMARY KEY,
CustomerName VARCHAR(100),
);
CREATE TABLE DimProduct (
ProductID INT PRIMARY KEY,
ProductName VARCHAR(100),
);
CREATE TABLE DimSalesperson (
SalespersonID INT PRIMARY KEY,
SalespersonName VARCHAR(100),
);
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(18,2),
SalesYear INT,
SalesLastYear INT,
FOREIGN KEY (CustomerID) REFERENCES DimCustomer(CustomerID),
FOREIGN KEY (ProductID) REFERENCES DimProduct(ProductID),
FOREIGN KEY (SalespersonID) REFERENCES DimSalesperson(SalespersonID),
FOREIGN KEY (TimeID) REFERENCES DimTime(TimeID)
);Schemas
Sales
Purchasing
Person
Production
HumanResources
dbo
 I need help inserting information into my dim and fact table.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!