Quiz 2

Data Warehouse Design & Implementation

342 words
2 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# Data Warehouse Design & Implementation ## 🎯 Learning Objectives - Design star schema and snowflake schema dimensional models - Implement slowly changing dimensions (SCD Types 0-6) - Design fact tables (transactional, periodic snapshot, accumulating) - Optimize data warehouse performance ## 📖 Core Content ### 8.1...

Data Warehouse Design & Implementation

🎯 Learning Objectives

  • Design star schema and snowflake schema dimensional models
  • Implement slowly changing dimensions (SCD Types 0-6)
  • Design fact tables (transactional, periodic snapshot, accumulating)
  • Optimize data warehouse performance

📖 Core Content

8.1 Dimensional Modeling

Kimball methodology (bottom-up):
  1. Select business process (e.g., sales)
  2. Declare grain (e.g., one row per transaction)
  3. Identify dimensions (who, what, where, when)
  4. Identify facts (measures) Fact table types:
TypeDescriptionExampleGrain
TransactionalEach transaction rowSales factPer line item
Periodic SnapshotRegular summaryMonthly inventoryPer month per product
Accumulating SnapshotProcess trackingOrder fulfillmentPer order (multiple dates)

8.2 Slowly Changing Dimensions

SCD TypeMethodUse Case
1Overwrite old valueNo history needed
2Add new row with effective datesFull history
3Add "old value" columnLimited history
6Hybrid (1+2+3)Combine approaches

8.3 Performance Optimization

TechniqueDescriptionImpact
IndexingBitmap indexes on dimension keysFast join performance
PartitioningSplit large tables by dateQuery pruning
Materialized viewsPre-compute aggregate queriesInstant aggregations
Columnar storageStore by column, not rowCompression, scan speed
Data compressionDictionary, run-length, delta5-10× storage reduction

📝 Practice Questions

Q1: When would you use a snowflake schema instead of star schema?
Snowflake normalizes dimension tables (e.g., Product table linked to Category table linked to Department table). Use when: (1) dimension tables are very wide (> 20 columns), (2) hierarchy management is important, (3) storage cost is a concern. Otherwise prefer star schema — simpler queries, faster performance. Q2: What is the grain of a fact table?
Grain defines what each row represents. "Sales fact at daily product store level" means each row = sales of one product in one store on one day. Once designed, grain cannot change without reloading the fact table. Always declare the most atomic grain possible — you can always aggregate up, but can't break down. Q3: How does an accumulating snapshot fact table work?
Used for processes with a defined start and end (order fulfillment, claim processing). One row per process with multiple date foreign keys (order_date, ship_date, delivery_date). Dates update as the process advances. Unlike transactional (append-only) and periodic (scheduled), accumulating snapshots update existing rows. Join Discord PreviousBI Tools
Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.