In simple terms grain is the lowest level till which you could identify the data in a table. For example: If you have table which holds the stock inventory and table holds:
Ø One record for each day of the stock : Than the grain would be one day
Ø One record for each hour : than the grain of the table would be hour
Ø One record for each week: than the grain of the week would be week.
It is important that while designing the database we design till the lowest grain for which we business needs to analyses or report. With example above, if your Stock inventory table has grain of day you can easily calculate weekly stock but vice versa is not true.
Similarly, grain of related
tables (Facts and Dims) should complement each other. For e.g. if
Fact_Stock_Inventory holds data for each hour and Dim_DateTime has a grain of a
day, it will generate distorted results.
Thanks a lot for giving us such a helpful information. You can also visit our website for ignou handwritten assignment hard copy
ReplyDelete