200 likes | 512 Views
Multidimensional Modeling in Data warehouses. Shilpa Seth. To Be Discussed. Multidimensional Data Model Concepts Data Cube Data warehouse Schemas - Star Schema - Snowflake Schema - Fact Constellation Schema. MULTIDIMENSIONAL DATA MODELS.
E N D
Multidimensional Modeling in Data warehouses Shilpa Seth
To Be Discussed.. • Multidimensional Data Model Concepts • Data Cube • Data warehouse Schemas - Star Schema - Snowflake Schema - Fact Constellation Schema
MULTIDIMENSIONAL DATA MODELS A data warehouse is based on a multidimensional data model which views data in the form of a DataCube. A data cube, such as sales, allows data to be modeled and viewed in multiple dimensions. Dimension tables, such as time (month, quarter, year) Fact table contains measures (such as units, price) and keys to each of the related dimension tables.
Dimensions: Product, Store, Time Hierarchical summarization paths Store Brand Region Year Product Country Quarter Type State Month Week City Day Product Time Multidimensional Data • Sales volume as a function of product, month, and region.
Dimensions and Facts • Dimensions are entities or perspective with respect to which an organization wants to keep records. • Facts are numerical measures. Back
Time(months) ∑ 2 3 4 5 milk Product cheese Toronto eggs. Vancouver Store Victoria ∑ ∑ ∑ ∑ ∑ ∑ Sample Data Cube Multidimensional viewofsales data
Cube: A Lattice of Cuboids In data warehousing literature, an n-D base cube is called a Base cuboid. The top most 0-D cuboid, which holds the highest-level of summarization, is called the Apex cuboid. The lattice of cuboids forms a Data Cube.
Cuboids Corresponding to the Cube all 0-D(apex) cuboid product store 1-D cuboids time product, store 2-D cuboids store, time product, time 3-D(base) cuboid product, store, time Back
DATA WAREHOUSE SCHEMAS • Star Schema • Snowflake Schema • Fact Constellation Schema
Sales Data Warehouse Model Time Sales fact Store City Product
Sales Measures & Dimensions • Measures– Units , Price. • Dimensions – Product, Time, Store.
Star Schema • A single , large and central fact table and one table for each dimension. • Every fact points to one tuple in each of the dimensions and has additional attributes. • Star Schema makes heavy use of denormalization to optimize for speed, at a potential cost of storage space.
Star Schema Sales Fact Table Store Dimension Time Dimension Measures Product Dimension Back
SnowFlake Schema • Variant of star schema model. • A single , large and central fact table and one or more tables for each dimension. • Dimension tables are normalized i.e. split dimension table data into additional tables.
Snow Flake Schema Sales Fact Table Time Dimension Store Dimension Product Dimension Back City Dimension
Fact Constellation Schema (Galaxy Schema) • Multiple fact tables share dimension tables. • This schema is viewed as collection of stars hence called galaxy schema or fact constellation. • Sophisticated application requires such schema.
Fact Constellation Sales Fact Table Shipping Fact Table Product Dimension Shipper Time Dimension Store Dimension Back
THANKS..... Back