• Semi-additive facts

    Posted on May 31st, 2007 biexplorer No comments

    What are semi-additive facts?

    Well, facts that can be aggregated across a few dimensions, but not all.

    Take the case of an inventory fact table.

    We track inventory every day for every product at every warehouse.

    To get the inventory on a given day for all products, I aggregate the inventory fact measures across the product dimension filtered for that particular day. The following query will give the inventory for every product for today.

    Select product_dim.name, sum(Inv_fact.inventory_qty)
    from
    product_dim, inv_fact, date_dim
    where
    date_dim.date_key= inv_fact.date_key and
    date_dim.calendar_dt=sysdate and
    product_dim.product_key = inv_fact.product_key
    group by product_dim

    However, I cannot add all the inventory quantities every day for a product, say for a month and get anything meaningful. Aggregation across time is meaningless. (of course, you can use it to calculate the average inventory per day)

    Such facts that can be aggregated across certain dimensions but not across all dimensions are called Semi-additive or partial facts.

  • What is a data warehouse?

    Posted on May 25th, 2007 biexplorer 1 comment

    What is a datawarehouse?

    In one line, it is a repository of several years of data using which reports can be created for business purposes (to take decisions).

    It is a database specifically modeled and fine-tuned for analysis and decision making.

    Read the rest of this entry »