Solved

# OLAP  - Star Schema - How to?

Posted on 2008-06-19
1,145 Views
Consider 2 tables that I want to incorporate somehow into an OLAP solution.

Customers (Customer Name, Age, StoreLocation, CurrentBalance)
One Row for each Customer
John Doe, 35, Modesto, \$0

Customer Invoice(Customer Name, Period, AmountPurchase, AmountPaid, PurchaseType)
One Row  for each period  the customer made purchase or payment.

John Doe,  May2004,    \$95.00,        \$0,  Camping Gear
John Doe, June2004,           \$0, \$95.00,  Payment
John Doe,  Sep2007,  \$505.00,        \$0,  Bicycle
John Doe,  Dec2007,           \$0,    \$505,  Payment

So I have a typical One to Many type relationship but I want to put this into an OLAP.
Beside the dimensions like Period, PurchaseType: PurchaseType don't I want to take the above 2 tables and put them into a single fact table?

Customer Name, Age, StoreLocation, CurrentBalance, May2004Purchase, May2004PurchaseType ...

Could be a very wide flat table that becomes the fact table.  How do you model this kind of table.
If the customer has been doing business for many years I could run out of columns.

0
Question by:michaelrobertfrench
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 8

Accepted Solution

srnar earned 500 total points
ID: 21829245
Desing constraints are domain of Olap tools. You don't mention which Olap tool you are going to use. For example in Microsoft Analysis Services 2005 I would model above situation fully normalized (Invoce = Sales fact table, Customer = Dimension table - intermediate dimension for a potential [Customer store] dimension etc.)

The only exception for denormalization would be in case where there is very rich Snow flake model on very big dimensions where processing of would take long time.

Imagine - the denormalization takes also processing time and can suffer all developer errors.
0

Author Closing Comment

ID: 31469007
thanks
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

### Suggested Solutions

simple bash script needed to unpack tar.gz 4 57
Access #Deleted data 20 64
update based on the value on another table 8 38
comparing two rows 10 38