OLTP vs OLAP: At a Glance
OLTP 🏃♀️
- Purpose: Day-to-day operations
- Data: Real-time, current
- Queries: Simple, fast (Read/Write)
- Database: Row-based storage
OLAP 🧠
- Purpose: Analysis & decision making
- Data: Historical, aggregated
- Queries: Complex, multi-dimensional
- Database: Columnar storage
OLTP: Normalized & ER Diagrams
Highly normalized to reduce redundancy, often visualized with ER diagrams where central entities are linked to attributes.
Data Sorting & Primary Keys
Data is sorted by a primary key (like 'OrderID') for fast lookups, essential for transactional operations.
OLAP: Star Schema
Uses Star Schemas where a central fact table (like 'Sales') is surrounded by dimension tables.