Understanding Fact and Dimension Tables in Star and Snowflake Schemas

•  Fact tables contain numerical data, while dimension tables provide context and background information.• Fact table forms a vertical table, while dimension table forms a horizontal table.• Fact table is used for analysis purpose and decision making. While the main task of dimension table is to store the information about a business and its process.Relationship between Facts and Dimensions- Facts tables are connected to Dimensions tables through foreign keys.- Each fact is related to one or more dimensions (e.g., a sales fact is related to a product dimension and a region dimension)- This connection allows for analysis and querying of facts by dimension attribute.Snowflake Schema and Star SchemaWhen we have a lot of data, we need a way to store and connect it all. That's where Snowflake and Star Schemas come in.Snowflake Schema- This is like a big, intricate snowflake with many connected points.- It's a detailed and organized way to store data, with many tables connected to each other.- Good for: Complex data, lots of relationships between dataStar Schema:- This is like a simple star with a central point and straight lines connecting to it.- It's a simpler way to store data, with one main table and a few connected tables.- Good for: Simple data, fast querying and reportingIn short, Snowflake Schema is like a detailed, connected web, while Star Schema is like a simple, centralized hub.

  • 0 Comments
  • 74 Views
  • Share: