Groups | Blog | Home
all groups > sql server data warehouse > may 2004 >

sql server data warehouse : One or two Fact tables


Ather Mian
5/13/2004 11:14:47 AM
Hi,



I am trying to set up an orders datamart, which would be fed from our ERP
daily. Requirement is to know at any given time what are the bookings, what
is the backlog and how much has been billed. I am trying to create a
dimensional model. My structure is as follows.



Table 1 Order: OrdID, CustID, EmployeeID, Country

Table 2 Products: ProdID, ProdLine

Table 3 Customers CustID, CustName

Table 5 Employees: Employee ID, EmployeeName

Table 5 Fact Table: Ord ID, ProdID, CustID,EmployeeID, Order Date, Invoice
Date, OrderQty, InvoicedQty, BacklogQty,Cost/Unit, Selling PricePer Unit



My problem is that for the orders that are unshipped would have a null date.
I was thinking of having two fact tables one for Booking and Backlog and
another one for Billing to avoid the null date problem or Is there a way to
do this with one fact table.



Any help would be greatly appreciated.



Thanks



Ather

Alejandro Leguizamo (MVP)
5/13/2004 7:12:04 PM
First, i recommend u to create a table called Time. This would be just
another dimension. And create a value called 0 wich translates to "Not
shipped yet"

if u need extra clarification, just let me know. :)

--
ALEJANDRO LEGUIZAMO
Colombia - SQL Server MVP


[quoted text, click to view]

Kyle L
5/16/2004 12:15:49 PM
It's common practice to not use a date value in the fact table. Instead,
linking the date through DateID to a dimension table allows one to create
all different kinds of date structures while only using two bytes of space
in the fact table instead of eight.

(Date strucures: fiscal year->fiscal month->fiscal week or weekdays vs.
weekends or traditional calendar months)

Yes, you have to transform the date to a smallint but when you encounter the
null value problem, you can address it with a special value in the Date
dimension table.


[quoted text, click to view]

kamel
5/18/2004 9:21:59 PM
I am using 2 cubes (I have 2 fact tables) and then have virtual cube made on
them.

Kamil
U¿ytkownik "Ather Mian" <ather@nowwhere.com> napisa³ w wiadomo¶ci
news:uwXQI0POEHA.2100@TK2MSFTNGP11.phx.gbl...
[quoted text, click to view]


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.683 / Virus Database: 445 - Release Date: 2004-05-12

AddThis Social Bookmark Button