Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Confusion on Facts and dimensions


Confusion on Facts and dimensions

Author
Message
danielfountain
danielfountain
Right there with Babe
Right there with Babe (789 reputation)Right there with Babe (789 reputation)Right there with Babe (789 reputation)Right there with Babe (789 reputation)Right there with Babe (789 reputation)Right there with Babe (789 reputation)Right there with Babe (789 reputation)Right there with Babe (789 reputation)

Group: General Forum Members
Points: 789 Visits: 888
Hey all,

I have just built a basic cube and all seems ok. I have just had my first confusion when it comes to design.

So lets say we have a system that has 100 clients that may or may not have orders.

So basically we would have a Fact table of orders. This would contain information about the order, client etc. Dimension would be the order value.

All cool there!

However from this table i couldnt count how many clients we have because:

1) the client would be duped on orders.
2) the client may not have an order.

Should i then have a separate FACT table for clients? Or even a separate Cube?

Also the product > order relationship is one to many - so should that be a different FACT table?

Many thanks for your time.

Dan
RonKyle
RonKyle
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1266 Visits: 3341
There's not enough here to be sure, but you need to determine what business process you are trying to represent, and then what factors are relevant to it. In this case, I think Orders is the business process. Customer and Product are two of the dimensions. You will also need a date dimension for the order date.

There's probably more you can capture. I would suggest you read Ralph Kimball's The Data Warehouse Toolkit, a source that has been recommended many times by many people on this site. Proper modeling is essential in a successful BI solution. Software will not cover for it.

Good luck!



moviesvj
moviesvj
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 31
If I understand you question right, client has to be a dimension

Since your fact may or may not have have captured orders from all clients, it is not possible to get a reliable value for count of all clients from the fact.

to find the number of clients with orders-> you have to query the fact.
to find the number of clients->you have to query the clients dimension.

to find the number of clients by joining the dimension and fact use a left join on client dimension.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search