?
Solved

OLAP  - Star Schema - How to?

Posted on 2008-06-19
2
Medium Priority
?
1,155 Views
Last Modified: 2013-11-16
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
Comment
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
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
srnar earned 2000 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

by:michaelrobertfrench
ID: 31469007
thanks
0

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question