Why NULL values are mapped as 0 in Fact tables?

后端 未结 4 1952
深忆病人
深忆病人 2020-12-21 00:40

What is the reason that in measure fields in fact tables (dimensionally modeled data warehouses) NULL values are usually mapped as 0?

4条回答
  •  失恋的感觉
    2020-12-21 01:25

    The main reason is that the database treats nulls differently from blanks or zeros, even though they look like blanks or zeros to the human eye.

    Here is a link to an old design tip by Ralph Kimball on the same topic.

    This blogpost talks about avoiding nulls in measures and gives a couple of suggestions.

提交回复
热议问题