Skip to content

Step 3: Data Modeling Fundamentals

Step 3: Data Modeling Fundamentals

Data modeling is the process of structuring data for ease of use. In analytical systems, we use the Star Schema.


πŸ—οΈ The Star Schema

A Star Schema consists of one Fact Table surrounded by multiple Dimension Tables.

1. Fact Tables

  • Store the quantitative data (the β€œNumbers”).
  • Example: Sales_Fact (Quantity, Total Amount, Discount).
  • Links to dimensions via Foreign Keys.

2. Dimension Tables

  • Store the descriptive data (the β€œContext”).
  • Example: Product_Dim (Name, Color, Category) or Date_Dim.

πŸ“ Normalization vs. Denormalization

  • OLTP (App DBs): Use 3rd Normal Form to reduce redundancy.
  • OLAP (Data Warehouses): Use Denormalized Star Schemas to increase query speed.

πŸ₯… Your Goal

  • Draw a Star Schema for a library system (Facts: Book Loans, Dimensions: Books, Users, Dates).
  • Understand what a Primary Key and Foreign Key are.