dwm module 1 (1.2)
dwm module 1 (1.2)
2 DWM MODULE 1
ER modelling Vs Dimensional
modelling
🔸 Fact Table
Ye table store karti hai:
●Numerical values (like sales amount,
quantity sold)
Example: Sales_Fact
text
CopyEdit
Date_ID | Product_ID |
Customer_ID | Store_ID | Revenue
| Quantity
🔹 Dimension Tables
Ye tables store karti hain descriptive details:
● Iska structure ek snowflake (बर्फ़ का फ़ूल) jaisa lagta hai — isliye naam
"snowflake schema"
🔢 1. Fact Table (Same as Star Schema):
● Yeh central table hoti hai.
🧠 Simply:
"Ye batata hai kya hua ya kya nahi hua, par kitna hua ye nahi
batata."
🔑 Key Characteristics
Feature Description
❌ No Measures Only foreign keys to dimensions, no numbers
like sales amount.
○ Student_Dim (Student_ID)
○ Class_Dim (Class_ID)
○ Date_Dim (Date_ID)
🧠 Meaning: Student 101 ne Class 501 attend kiya on 1st May 2024.
2️⃣ Coverage Factless Fact Table
Jab kisi event ke nahi hone ko capture karte hain, jaise product
eligible tha but purchase nahi hua.
✅ Example: Promotion Eligibility
● Dimensions:
○ Product_Dim (Product_ID)
○ Store_Dim (Store_ID)
○ Promotion_Dim (Promotion_ID)
🎓 Real-Life Scenarios:
Use Case Factless Table
Type
🧠 Simply:
"Jab ek hi data warehouse me multiple star schemas hote hain jo
same dimension tables use karte hain — us design ko Fact
Constellation ya Galaxy schema kehte hain."
🧩 Key Characteristics
Feature Description
🧱 Combines Multiple Star Each fact table with its own star schema
Schemas
2. Shipping_Fact
🧱 Common Dimensions:
● Product_Dim
● Customer_Dim
● Store_Dim
● Date_Dim
📊 Tables
Sales_Fact
Sale_ID Product_I Customer_ Store_I Date_I Amou
D ID D D nt
Shipping_Fact
Shipment_ID Product_I Store_I Date_I Shipping_C
D D D ost
Shared Dimensions:
🧠 Explanation:
● Dono fact tables (Sales + Shipping) Product, Store, Date ko share karte
hain.
🌌
Snowflake Schema – Star ke andar branches
Fact Constellation – Multiple stars = Galaxy