Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

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

The World Wide Web And Databases International Workshop Webdb 98 Valencia Spain March 27 28 1998 Selected Papers Lncs 1590

Authors: Paolo Atzeni ,Alberto Mendelzon ,Giansalvatore Mecca

1st Edition

3540658904, 978-3540658900

More Books

Students also viewed these Databases questions

Question

Idk what im doing wrong this is the question

Answered: 1 week ago

Question

Evaluate three pros and three cons of e-prescribing

Answered: 1 week ago

Question

8. Explain the relationship between communication and context.

Answered: 1 week ago