jw970170
Programmer
- Aug 8, 2005
- 38
Can dimension tables contain NULL values? This comes up if we have a FACT table that contains a time dimension. Suppose the time dimension table has attributes Year, Month, Day. The fact table contains all kindas of transactions. Suppose there is a transaction that occurs at a yearly level. It is valid for an entire year but not a specific day or month. This transaction in the fact table would reference a row in DIM_TIME that has a value for the year but NULL for Day and Month (since it covers an entire year, but not any specific day or month). Is that ok (to have NULL for a couple fields in the DIM tables)
FACT_TABLE
KeyField
TimeID(FK)
Value
DIM_TIME
TimeID
Day
Month
Year
FACT_TABLE
KeyField
TimeID(FK)
Value
DIM_TIME
TimeID
Day
Month
Year