Data Warehouse: 20
Star Schema
Prof Neeraj Bhargava
Vaibhav Khanna
Department of Computer Science
School of Engineering and Systems Sciences
Maharshi Dayanand Saraswati University Ajmer
What is a Star Schema
• A schema is a collection of database objects,
including tables, views, indexes, and
synonyms.
• The term star schema is another way of
referring to a "dimensional modeling"
approach to defining your data model.
• Dimensional modeling creates multiple star
schemas, each based on a business process
such as sales tracking or shipments.
Star schema
Facts and Dimensions
• Star schemas divide data into facts and
dimensions.
• Facts are the measurements of some event such
as a sale and are typically numbers.
• Dimensions are the categories that we use to
identify facts, such as date, location, and product.
• The name "star schema" comes from the fact that
the diagrams of the schemas typically show a
central fact table with lines joining it to the
dimension tables, so the graphic impression is
similar to a star.
Deriving a Star Schema from ER Model
• •A fact table is formed for each kernel entity. The key
of the table is the combination of the keys of its
associated detail entities.
• •A dimension table is formed for each detail entity by
collapsing related dependent entities into it.
• •Where dependent relationships exist between kernel
entities, the child entity inherits all of the dimensions
(and key attributes) from the parent entity.
• •Numerical attributes within kernel or core entities
should be aggregated by key attributes.
Sales Kernel Star Schema
Sales Item Kernel Star Schema
Entities in a sales model
• Customer - the people and companies we sell to
• Product - the things we sell
• Sales - a transaction between our company and a
customer
• Sales planning - setting sales goals and
procedures for the coming period
• Sales plan - a statement of goals for sales and the
steps to achieve those goals Date of sale - the
date of a sales transaction
Sales Entities
• Distribution Channel - the means by which the
product was sold to the customer
• Salesperson - the person who sold the product
to the customer
• Competitor - the other companies who offer
competing products
• Sales Office - a location where a group of
salespeople are managed
Star Schema Features
• Star schemas are a central part of an access and
performance optimization layer.
• The goal for star schemas is structural simplicity and
high performance data retrieval
• The star schema accepts data redundancy (de
normalization) in its dimension tables for the sake of
easy user understanding and better data retrieval
performance.
• The star schemas are knit together through conformed
dimensions and conformed facts.
• A common criticism of star schemas is that they limit
analysis flexibility compared to 3NF designs.
Advantages of Star Schema
• Star schemas are de normalised meaning the typical
rules of normalization applied to transactional
relational databases are relaxed during star-schema
design and implementation.
• Simpler queries – star-schema join-logic is generally
simpler than the join logic required to retrieve data
from a highly normalized transactional schema.
• Simplified business reporting logic.
• Query performance gains
• Fast aggregations – the simpler queries against a star
schema can result in improved performance for
aggregation operations.
Assignment
• Explain the concept and usage of Star Schema
• Illustrate the usage of star schema in sales
data management and analysis.

Data warehouse 20 star schema

  • 1.
    Data Warehouse: 20 StarSchema Prof Neeraj Bhargava Vaibhav Khanna Department of Computer Science School of Engineering and Systems Sciences Maharshi Dayanand Saraswati University Ajmer
  • 2.
    What is aStar Schema • A schema is a collection of database objects, including tables, views, indexes, and synonyms. • The term star schema is another way of referring to a "dimensional modeling" approach to defining your data model. • Dimensional modeling creates multiple star schemas, each based on a business process such as sales tracking or shipments.
  • 3.
  • 4.
    Facts and Dimensions •Star schemas divide data into facts and dimensions. • Facts are the measurements of some event such as a sale and are typically numbers. • Dimensions are the categories that we use to identify facts, such as date, location, and product. • The name "star schema" comes from the fact that the diagrams of the schemas typically show a central fact table with lines joining it to the dimension tables, so the graphic impression is similar to a star.
  • 5.
    Deriving a StarSchema from ER Model • •A fact table is formed for each kernel entity. The key of the table is the combination of the keys of its associated detail entities. • •A dimension table is formed for each detail entity by collapsing related dependent entities into it. • •Where dependent relationships exist between kernel entities, the child entity inherits all of the dimensions (and key attributes) from the parent entity. • •Numerical attributes within kernel or core entities should be aggregated by key attributes.
  • 6.
  • 7.
    Sales Item KernelStar Schema
  • 8.
    Entities in asales model • Customer - the people and companies we sell to • Product - the things we sell • Sales - a transaction between our company and a customer • Sales planning - setting sales goals and procedures for the coming period • Sales plan - a statement of goals for sales and the steps to achieve those goals Date of sale - the date of a sales transaction
  • 9.
    Sales Entities • DistributionChannel - the means by which the product was sold to the customer • Salesperson - the person who sold the product to the customer • Competitor - the other companies who offer competing products • Sales Office - a location where a group of salespeople are managed
  • 10.
    Star Schema Features •Star schemas are a central part of an access and performance optimization layer. • The goal for star schemas is structural simplicity and high performance data retrieval • The star schema accepts data redundancy (de normalization) in its dimension tables for the sake of easy user understanding and better data retrieval performance. • The star schemas are knit together through conformed dimensions and conformed facts. • A common criticism of star schemas is that they limit analysis flexibility compared to 3NF designs.
  • 11.
    Advantages of StarSchema • Star schemas are de normalised meaning the typical rules of normalization applied to transactional relational databases are relaxed during star-schema design and implementation. • Simpler queries – star-schema join-logic is generally simpler than the join logic required to retrieve data from a highly normalized transactional schema. • Simplified business reporting logic. • Query performance gains • Fast aggregations – the simpler queries against a star schema can result in improved performance for aggregation operations.
  • 12.
    Assignment • Explain theconcept and usage of Star Schema • Illustrate the usage of star schema in sales data management and analysis.