Friday, 29 June 2012

What are Dimension and Fact?

Dimensions are categories by which summarized data can be viewed. E.g. a profit summary in a fact table can be viewed by a Time dimension (profit by month, quarter, year), Region dimension (profit by country, state, city), Product dimension (profit for product1, product2).
A fact table is a table that contains summarized numerical and historical data (facts) and a multipart index composed of foreign keys from the primary keys of related dimension tables.
In data warehousing, a dimension is a collection of reference information about a measurable event. These events are known as facts and are stored in a fact table. Dimensions categorize and describe data warehouse facts and measures in ways that support meaningful answers to business questions. They form the very core of dimensional modeling.
Dimension tables are referenced by fact tables using keys. When creating a dimension table in a data warehouse, a system-generated key is used to uniquely identify a row in the dimension. This key is also known as a surrogate key. The surrogate key is used as the primary key in the dimension table. The surrogate key is placed in the fact table and a foreign key is defined between the two tables. When the data is joined, it does so just as any other join within the database.

6 comments:

  1. which of the following are attribute of dimension ::: 1.hosptital name 2. doctor 3. no. of patients 4. total consulting fee 5. doctors contact number

    ReplyDelete
    Replies
    1. HospitalName,doctor,contact number are dimensions
      No of patients,fee are measures

      Delete
  2. which of the following are dimension ::
    1. Amount of money
    2. Time of deposit
    3. Account number
    4. Interest rate
    5. mode of payment

    ReplyDelete
    Replies
    1. Time of deposit, Mode of Payment are Dimensions i think so.. may be

      Delete
    2. time,account number,mode of payment are dimension rest are measures/facts

      Delete

Related Posts Plugin for WordPress, Blogger...

ShareThis