Short note on Star Schema.
Start Schema
- It is the data warehouse schema that contains two types of tables: Fact Table and Dimension Tables. Fact Table lies at the center point and dimension tables are connected with fact table such that star share is formed.
→ Fact Tables: A fact table typically has two types of columns: foreign keys to dimension tables and measures that contain numeric facts. A fact table can contain fact data on detail or aggregated level.
→ Dimension Tables: Dimension tables usually have a relatively small number of records compared to fact tables, but each record may have a very large number of attributes to describe the fact data. Each dimension in the star schema has only one dimension table and each table holds a set of attributes. This constraint may cause data redundancy. The following diagram shows the sales data of a company with respect to the four dimensions, namely time, item, branch, and location.
- There is a fact table at the center. It contains the keys to each of the four dimensions. The fact table also contains the attributes, namely dollars sold and units sold.
Advantages and Disadvantages of Star Schema
- Since star schema contains de-normalized dimension tables, it leads to simpler queries due to a lesser number of join operations and it also leads to better system performance.
- On the other hand, it is difficult to maintain the integrity of data in star schema due to de-normalized tables. It is the widely used data warehouse schema and is also recommended by oracle
Comments
Post a Comment