Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Design Question Again.

 
   Database Help (Home) -> Data Warehouse RSS
Next:  Incremental cube update with changing data in M2M..  
Author Message
Ed

External


Since: Nov 05, 2007
Posts: 37



(Msg. 1) Posted: Thu Apr 17, 2008 2:08 pm
Post subject: Design Question Again.
Archived from groups: microsoft>public>sqlserver>datawarehouse (more info?)

Hi,
I am a newbie and I have been studying DW for a while and I've
successfully built some cubes.
There is still one thing I am not sure how to design it in the fact table
which is the COUNT. Let's say I have an Order Fact to record the order from
customers. Then I have OrderDate, ShipDate, CancelDate, PickupDate, and some
sales related measurments. How do I count how many orders were cancelled (I
stored -1 as a value) for CancelDate? Should I add an measurment column that
put a value of 1 if the order was cancelled and put 0 if the order was not
cancelled so that it can be aggregated in the cube? I need the same thing to
count the pickup since some customers pick up in the store not ship out and I
need to be able to generate the comparison between ShipOut, Pickup, and
Cancel.

Thanks so much

Ed

 >> Stay informed about: Design Question Again. 
Back to top
Login to vote
Charles Wang [MSFT]

External


Since: Apr 18, 2008
Posts: 1



(Msg. 2) Posted: Fri Apr 18, 2008 6:08 pm
Post subject: Re: Design Question Again. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Ed,
I think that you can add either add a column to your fact table or not. The
reason is that if you do not want to add it to your fact table, you can
create a view that combines your fact table and an additional column for
cancel status in your data warehouse. After that you can use it as the fact
table in your cube. This should be easily implemented in T-SQL statement.
You can also applies this method to your other requirements on ShipOut,
Pickup and Cancel. If you use ROLAP, the query performance may be slower
than putting them into one fact table. If you use MOLAP, the performance
impact can be ignored.

Hope this helps. Please feel free to let me know if you have any other
questions or concerns.

Have a nice day!

Best regards,
Charles Wang
Microsoft Online Community Support
===========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg DeleteThis @microsoft.com.
===========================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx...tificat

Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
============================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
"Ed" wrote in message

> Hi,
> I am a newbie and I have been studying DW for a while and I've
> successfully built some cubes.
> There is still one thing I am not sure how to design it in the fact table
> which is the COUNT. Let's say I have an Order Fact to record the order
> from
> customers. Then I have OrderDate, ShipDate, CancelDate, PickupDate, and
> some
> sales related measurments. How do I count how many orders were cancelled
> (I
> stored -1 as a value) for CancelDate? Should I add an measurment column
> that
> put a value of 1 if the order was cancelled and put 0 if the order was not
> cancelled so that it can be aggregated in the cube? I need the same thing
> to
> count the pickup since some customers pick up in the store not ship out
> and I
> need to be able to generate the comparison between ShipOut, Pickup, and
> Cancel.
>
> Thanks so much
>
> Ed
>

 >> Stay informed about: Design Question Again. 
Back to top
Login to vote
Ed

External


Since: Nov 05, 2007
Posts: 37



(Msg. 3) Posted: Fri Apr 18, 2008 6:08 pm
Post subject: Re: Design Question Again. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks. This is a very good suggestion and I learn one more thing from you
about I can create a view as a fact table so that I can use some case
statement in SQL to put the value of 1 or 0. The Kim Ball group books that I
have read so far, they just said it is always MOLAP. I don't think creating
view would be an issue.

I am still wondering if I don't create columns in the fact table to hold 1
or 0 for cancel date / ship out date, etc, can I still count / distinct count
how many orders were cancelled at different level after building the cube? I
guess the answer would be "Yes" but what is the way to it?

Thanks again.

Ed

"Charles Wang [MSFT]" wrote:

> Hi Ed,
> I think that you can add either add a column to your fact table or not. The
> reason is that if you do not want to add it to your fact table, you can
> create a view that combines your fact table and an additional column for
> cancel status in your data warehouse. After that you can use it as the fact
> table in your cube. This should be easily implemented in T-SQL statement.
> You can also applies this method to your other requirements on ShipOut,
> Pickup and Cancel. If you use ROLAP, the query performance may be slower
> than putting them into one fact table. If you use MOLAP, the performance
> impact can be ignored.
>
> Hope this helps. Please feel free to let me know if you have any other
> questions or concerns.
>
> Have a nice day!
>
> Best regards,
> Charles Wang
> Microsoft Online Community Support
> ===========================================================
> Delighting our customers is our #1 priority. We welcome your
> comments and suggestions about how we can improve the
> support we provide to you. Please feel free to let my manager
> know what you think of the level of service provided. You can
> send feedback directly to my manager at: msdnmg DeleteThis @microsoft.com.
> ===========================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx...tificat
>
> Note: The MSDN Managed Newsgroup support offering is for
> non-urgent issues where an initial response from the community
> or a Microsoft Support Engineer within 1 business day is acceptable.
> Please note that each follow up response may take approximately
> 2 business days as the support professional working with you may
> need further investigation to reach the most efficient resolution.
> The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by
> contacting Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ============================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
> =========================================================
> "Ed" wrote in message
>
> > Hi,
> > I am a newbie and I have been studying DW for a while and I've
> > successfully built some cubes.
> > There is still one thing I am not sure how to design it in the fact table
> > which is the COUNT. Let's say I have an Order Fact to record the order
> > from
> > customers. Then I have OrderDate, ShipDate, CancelDate, PickupDate, and
> > some
> > sales related measurments. How do I count how many orders were cancelled
> > (I
> > stored -1 as a value) for CancelDate? Should I add an measurment column
> > that
> > put a value of 1 if the order was cancelled and put 0 if the order was not
> > cancelled so that it can be aggregated in the cube? I need the same thing
> > to
> > count the pickup since some customers pick up in the store not ship out
> > and I
> > need to be able to generate the comparison between ShipOut, Pickup, and
> > Cancel.
> >
> > Thanks so much
> >
> > Ed
> >
>
>
 >> Stay informed about: Design Question Again. 
Back to top
Login to vote
Charles Wang [MSFT]

External


Since: Apr 18, 2008
Posts: 268



(Msg. 4) Posted: Mon Apr 21, 2008 6:38 am
Post subject: Re: Design Question Again. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Ed,
Yes, you can do it. As I had said that if you do not create columns in the
fact table to hold 1 or 0, you can create a view for including the columns
that hold 1 or 0. However in either way, adding such values is necessary
since you need additive values for counting in OLAP analysis.

Hope this helps. Please feel free to let me know if you have any other
questions or concerns. Have a nice day!

Best regards,
Charles Wang
Microsoft Online Community Support
=========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg DeleteThis @microsoft.com.
=========================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
 >> Stay informed about: Design Question Again. 
Back to top
Login to vote
Tomasz Borawski

External


Since: Feb 07, 2005
Posts: 28



(Msg. 5) Posted: Mon Apr 21, 2008 7:58 am
Post subject: RE: Design Question Again. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,

Why are not going to create dimension called Order Type with to members
Ordered, Shipout, Pickout and Canceled? You could use COUNT to measure all
orders and filter them if you would like to show only canceled and you do not
need to use -1 as a value.

"Ed" wrote:

> Hi,
> I am a newbie and I have been studying DW for a while and I've
> successfully built some cubes.
> There is still one thing I am not sure how to design it in the fact table
> which is the COUNT. Let's say I have an Order Fact to record the order from
> customers. Then I have OrderDate, ShipDate, CancelDate, PickupDate, and some
> sales related measurments. How do I count how many orders were cancelled (I
> stored -1 as a value) for CancelDate? Should I add an measurment column that
> put a value of 1 if the order was cancelled and put 0 if the order was not
> cancelled so that it can be aggregated in the cube? I need the same thing to
> count the pickup since some customers pick up in the store not ship out and I
> need to be able to generate the comparison between ShipOut, Pickup, and
> Cancel.
>
> Thanks so much
>
> Ed
>
 >> Stay informed about: Design Question Again. 
Back to top
Login to vote
Ed

External


Since: Nov 05, 2007
Posts: 37



(Msg. 6) Posted: Mon Apr 21, 2008 11:37 am
Post subject: RE: Design Question Again. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

that would work too but 1 order could have 3 records.
OrderDate, ShipoutDate/PickupDate or CancelledDate.

On the other side, the fact table needs to be updated for different date if
it is not at the Order Type level.

What would be a better way?

"Tomasz Borawski" wrote:

> Hi,
>
> Why are not going to create dimension called Order Type with to members
> Ordered, Shipout, Pickout and Canceled? You could use COUNT to measure all
> orders and filter them if you would like to show only canceled and you do not
> need to use -1 as a value.
>
> "Ed" wrote:
>
> > Hi,
> > I am a newbie and I have been studying DW for a while and I've
> > successfully built some cubes.
> > There is still one thing I am not sure how to design it in the fact table
> > which is the COUNT. Let's say I have an Order Fact to record the order from
> > customers. Then I have OrderDate, ShipDate, CancelDate, PickupDate, and some
> > sales related measurments. How do I count how many orders were cancelled (I
> > stored -1 as a value) for CancelDate? Should I add an measurment column that
> > put a value of 1 if the order was cancelled and put 0 if the order was not
> > cancelled so that it can be aggregated in the cube? I need the same thing to
> > count the pickup since some customers pick up in the store not ship out and I
> > need to be able to generate the comparison between ShipOut, Pickup, and
> > Cancel.
> >
> > Thanks so much
> >
> > Ed
> >
 >> Stay informed about: Design Question Again. 
Back to top
Login to vote
Tomasz Borawski

External


Since: Feb 07, 2005
Posts: 28



(Msg. 7) Posted: Fri May 16, 2008 2:45 am
Post subject: RE: Design Question Again. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I think you need to decide what is important for you:
- Searching for single events (ordering, shipping etc) - just current status
(the most common scenario)
- Searching for multiple events - intresiting idea, but is it really required?




"Ed" wrote:

> that would work too but 1 order could have 3 records.
> OrderDate, ShipoutDate/PickupDate or CancelledDate.
>
> On the other side, the fact table needs to be updated for different date if
> it is not at the Order Type level.
>
> What would be a better way?
>
> "Tomasz Borawski" wrote:
>
> > Hi,
> >
> > Why are not going to create dimension called Order Type with to members
> > Ordered, Shipout, Pickout and Canceled? You could use COUNT to measure all
> > orders and filter them if you would like to show only canceled and you do not
> > need to use -1 as a value.
> >
> > "Ed" wrote:
> >
> > > Hi,
> > > I am a newbie and I have been studying DW for a while and I've
> > > successfully built some cubes.
> > > There is still one thing I am not sure how to design it in the fact table
> > > which is the COUNT. Let's say I have an Order Fact to record the order from
> > > customers. Then I have OrderDate, ShipDate, CancelDate, PickupDate, and some
> > > sales related measurments. How do I count how many orders were cancelled (I
> > > stored -1 as a value) for CancelDate? Should I add an measurment column that
> > > put a value of 1 if the order was cancelled and put 0 if the order was not
> > > cancelled so that it can be aggregated in the cube? I need the same thing to
> > > count the pickup since some customers pick up in the store not ship out and I
> > > need to be able to generate the comparison between ShipOut, Pickup, and
> > > Cancel.
> > >
> > > Thanks so much
> > >
> > > Ed
> > >
 >> Stay informed about: Design Question Again. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
newbie design question - I am designing a dimBroker table about all the Borker information. However, there is a table called BrokerContact in the OLTP systems. Obviously, one broker can have multiple contacts. What is the best way to design the relationship in the Dimensio...

Fact Table(s) Design Question - Please forgive the cross-posting, I wasn't sure the best place to put this question. I'm modeling a procurement process as part of a data warehouse project - and in this case what we're procuring is people (filling jobs). The basic process is that the..

Newbie question - hi, I am interested in building a DW for my company. As usual, we have 4 different systems which holds different applications. I would like to know what is the first step of buidling the DW? Retrieve the columns / data that we need? Any good lin...

SQL Scheduled Jobs - Is there a way to monitor schedule jobs and restart the jobs automatically when it faills and if it fails then notify the responsible person, is there a tool to do this ?

Running total with "treshold value" detection..? - Hi, I have to create a query which evalaute, for each year, the employees who reached a particular number of absences and when this value is reached. I have 1 000 000 records in my absence table. my table is like this: DateID, EmployeeID, ActivityID,...
   Database Help (Home) -> Data Warehouse All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]