Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Repeating a date in both a dim and fact Expand / Collapse
Author
Message
Posted Tuesday, October 22, 2013 3:27 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, April 29, 2014 6:47 AM
Points: 319, Visits: 783
I have designed a warehouse which includes a type 2 order dimension and a accumulating snapshot table to analyse the position of an order in the process which may help to identify bottlenecks and inefficiencies in the process.

I have a order date on the order dimension but I also repeat this date along with several other key dates in the accumulating snapshot. This table also holds a key to the order dimension.

I find myself being challenged on this design by colleagues who believe I shouldn't be repeating this field in both tables.

I believe the design is an optimum one for the following reasons:

1. It would be much more costly to derive order to date metrics from the dimension and transactional facts.

2. Providing a different view of the data for analytical purposes at a preaggregated level ensures cube and reporting performance isn't compromised.

3. Some fields such as product for example won't be stored on the accumulating snapshot and this is not the purpose of the table although attributes such as this can still be obtained by using the dim order key anyway.

I am not one to drive a idea of my own through and I always like to gain general consesnus - hence this post!

Do you feel my approach is justified and I missing any drawbacks?
Post #1507392
Posted Tuesday, October 22, 2013 3:35 PM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, September 18, 2014 12:39 AM
Points: 3,105, Visits: 11,494
It would be easier to know what you are getting at if you post the schema of the tables.

Post #1507394
Posted Tuesday, October 22, 2013 3:47 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, April 29, 2014 6:47 AM
Points: 319, Visits: 783
A little difficult to currently (not in the office or on a PC!!) I'll give it a shot...forgive any syntax errors!

So DimOrder is snowflakes to DimProduct and this is a condensed amount fields:

Create table DimOrder
(DimOrderKey int identity(1,1),
DimProductKey int,
DimOrderDateKey int,
DimOrderProcessed int,
DimOrderDispatchedKey int,
OrderType varchar(10),
DateRowStart datetime,
DateRowEnd date time,
IsRowCurrent bit)

Create table FactAccumSnapshot
(DimOrderKey int,
DimOrderDateKey int
,DimOrderProcessedDateKey int,
OrderDateToProcessLag int,
AmountPaidToDate money,
LastPaymentAmount money,
DimLastPaymentDateKey int)

The date keys are all based on role playing view back to dim date
Post #1507400
Posted Tuesday, October 22, 2013 8:08 PM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, September 18, 2014 12:39 AM
Points: 3,105, Visits: 11,494
DimOrder doesn't look like a dimension table. It looks more like a fact table.





Post #1507444
Posted Thursday, October 24, 2013 1:47 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, April 29, 2014 6:47 AM
Points: 319, Visits: 783
Sorry for the delay Micheal, as I mentioned I only included a condensed list of fields, other I can think of which are included are order description for example. The most important attributed for the business are associated dates.

However, since you ask......there are several attributes on a order which have a one-to-one relationship such as status, final outcome etc. etc. Now we are going off topic a little but originally I included these fields on the order dimension. The guys in the team wanted this separated out into separate dimensions so now we have several attributes which are snowflaked and will be 'flattened' in views to the cube.
Post #1508248
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse