Saturday, April 10, 2010

Star Shema and OLAP

STAR SCHEMA
also known as star join schema.
Don't get so worried about Star schema, it is important to know about it, because it builds up the concept of Multidimensional database system.
"It is a method or a way to implement a multidimensional data base system from relational database".............
So what does this Star schema got to do ?
where do we actually need to it?


THe main feature of the star schema is FACT TABLE and DIMENSION TABLES,Which allows browsing,drill down,specifying criteria.

FACT TABLE:The fact table contains the primary key madeup of Foreign keys that have migrated from all dimensions.The fact table is usually skinny and long.
Facts and Dimensions

FACTS AND DIMENSIONS


When examining how people look at data, they usually want to see some sort of aggregated data. These data are called measures or facts. These measures are numeric values that are measurable and usually additive.
For example, sales dollars are a perfect measure. Every order that comes in generates a certain sales volume measured in some currency. If your company sells 20 products in one day, each for $5 dollars, they generate 100 dollars in total sales. Therefore, sales dollars is one measure or fact most companies track. Companies may also want to know how many customers they had that day. Did 5 customers buy an average of 4 products each, or did just one customer buy 20 products? Sales dollars and customer counts are two measures businesses may want to track.

DIMENSIONS
Just tracking measures isn't enough, however. People need to look at measures using those "by" conditions. The "by" conditions are called dimensions. In order to examine sales dollars, people almost always wan to see them by day, or by quarter, or by year. There is almost always a time dimension on anything people ask for. They may also want to know sales by category or by product. These "by" conditions will map into dimensions: there is almost always a time dimension, and product and geography dimensions are very common as well.

Therefore, in designing a star schema, the first order of business is usually to determine what people want to see (the measures) and how they want to see it (the dimensions).



Reference:
Designing the Star Schema Database
Version 1.1
By Craig Utley
This is one of the best articles.

CLICK TO READ THE ARTICLE

No comments: