Star and Snowflake Schema

Star and snowflake schema designs are mechanisms to separate facts and dimensions into separate tables. Snowflake schemas further separate the different levels of a hierarchy into separate tables. In either schema design, each table is related to another table with a primary key/foreign key relationship. Primary key/foreign key relationships are used in relational databases to define many-to-one relationships between tables. 




Star Schema

A Data mart design pattern consisting of fact and dimension tables resembling a star like shape. 

The following figure shows a star schema with a single fact table and four dimension tables. A star schema can have any number of dimension tables. The multiple branches at the end of the links connecting the tables indicate a many-to-one relationship between the fact table and each dimension table.





Snowflake Schema

The following figure shows a snowflake schema with two dimensions, each having three levels. A snowflake schema can have any number of dimensions and each dimension can have any number of levels.

Comments