Star Schema in Data Warehouse modeling (original) (raw)
Last Updated : 24 Nov, 2025
A Star Schema organizes data into a central fact table linked to multiple dimension tables, forming a layout that visually resembles a star. This structure makes analytical queries fast, simple, and efficient making it one of the most commonly used data modeling techniques in data warehousing.
Components of Star Schema

Star Schema
**1. Fact Table: The fact table sits at the center of the schema and stores the measurable, quantitative data used for analysis. Examples include:
- Sales amount
- Units sold
- Discount
- Profit
Each record in a fact table represents a business event (e.g., a sales transaction).
**2. Dimension Tables: Dimension tables surround the fact table and contain descriptive attributes that add context to the facts. Common dimensions include:
- Product details
- Customer details
- Time attributes
- Employee or store information
These tables allow users to slice, dice, filter, and group the fact data for analysis (e.g., sales by region, by month, by product category).
Features of Star Schema
- Central fact table holding numerical measures
- Dimension tables storing descriptive attributes
- Denormalized design, allowing fast joins and simple queries
- Pre-aggregated and summary-friendly structure
- High query performance, especially for OLAP workloads
- Easy to understand, even for non-technical users
Star Schema Example (Sales Data Warehouse)
To demonstrate how a star schema works, consider a Sales Data Warehouse where each sales transaction is stored in a central fact table and is analyzed through surrounding dimension tables. This model supports fast, flexible analysis across products, customers, time, and employees.

Star Schema Diagram for Sales Data Warehouse
- SALES fact table stores numerical measures such as total amount, quantity, and discount, along with foreign keys to each dimension.
- Surrounding dimension tables provide descriptive attributes that allow the facts to be examined from different perspectives.
- Product Dimension describes what was sold and the Customer Dimension identifies who purchased it.
- Time Dimension indicates when the transaction occurred, and the Employee Dimension specifies who processed the sale.
Advantages of Star Schema
- Simpler Queries: Join logic of star schema is quite cinch in comparison to other join logic which are needed to fetch data from a transactional schema that is highly normalized.
- Simplified Business Reporting Logic: In comparison to a transactional schema that is highly normalized, the star schema makes simpler common business reporting logic, such as of reporting and period-over-period.
- Feeding Cubes: Star schema is widely used by all OLAP systems to design OLAP cubes efficiently. In fact, major OLAP systems deliver a ROLAP mode of operation which can use a star schema as a source without designing a cube structure.
Disadvantages of Star Schema
- Redundancy: Denormalized data can introduce duplicates and potential inconsistency if not managed properly.
- Limited Flexibility: Not as adaptable as normalized models when analytical needs change frequently.
- Weak Support for Many-to-Many Relationships: Requires bridge tables or workarounds to model such relationships.