🔍 Ctrl+K
🟡 Intermediate

Data Modeling

Conceptual → Logical → Physical

Levels
Conceptual (Customer places Order)

Logical (attributes, relationships, keys)

Physical (tables, columns, indexes)
🔴 Advanced

Normalization

Reduce duplication, improve integrity.

🟡 Intermediate

First Normal Form — 1NF

Values atomic. Bad: student_id | courses = SQL, Python, Java → Better: one row per course.

student_idcourse
1SQL
1Python
🔴 Advanced

Second Normal Form — 2NF

Be in 1NF + non-key attributes depend on entire primary key (no partial dependency, relevant for composite keys).

🔴 Advanced

Third Normal Form — 3NF

Be in 2NF + no transitive dependency: employee_id → department_id → department_name (department_name belongs in department table).

🟡 Intermediate

OLTP vs OLAP

OLTP handles many small transactional writes, while OLAP handles large analytical reads and aggregations.

OLTPOLAP
Many small transactions, INSERT/UPDATE/DELETE, operationalLarge analytical queries, aggregations, historical, read-heavy
Banking, OrdersReporting, BI
🟢 Easy

Fact & Dimension Tables

Fact: measurable events (sales: sales_id, customer_id, product_id, quantity, sales_amount). Dimension: descriptive (customer: customer_id, name, city, country).

🔴 Advanced

Star Schema

A Star Schema places a central fact table surrounded by dimension tables, enabling simple and fast analytical queries.

Star Schema
Date

Customer ── Sales ── Product

Geography
Star Schema

Central fact, dimensions around, simpler queries.

🔴 Advanced

Snowflake Schema

A Snowflake Schema further normalizes dimensions into multiple related tables, reducing redundancy at the cost of more joins.

Snowflake
Product

Product Category

Customer ── Sales ── Date

More normalized dimensions, more joins.

🟡 Intermediate

Star vs Snowflake

Compare Star and Snowflake schemas to understand the trade-offs between query simplicity, join count, and normalization.

StarSnowflake
Less normalized, simpler, fewer joinsMore normalized, more tables, more joins