1 Dimensional Modelling III. 2 Dimensional Models A denormalized relational model Made up of tables with attributes Relationships defined by keys and.

Slides:



Advertisements
Similar presentations
Data Warehousing and Data Mining J. G. Zheng May 20 th 2008 MIS Chapter 3.
Advertisements

Dimensional Modeling By Dr. Gabriel.
Dimensional Modeling.
CHAPTER OBJECTIVE: NORMALIZATION THE SNOWFLAKE SCHEMA.
BY LECTURER/ AISHA DAWOOD DW Lab # 2. LAB EXERCISE #1 Oracle Data Warehousing Goal: Develop an application to implement defining subject area, design.
Data Warehousing Willem Visser RW334. Somebody is watching! Everybody seems to be recording your every move Loyalty cards Cookies – Facebook, Twitter,…
Copyright © Starsoft Inc, Data Warehouse Architecture By Slavko Stemberger.
GB Video Dimensional Example. Customer #Cust No F Name L Name Ads1 Ads2 City State Zip Tel No CC No Expire Rental #Rental No Date Clerk No Pay Type CC.
Data Warehousing M R BRAHMAM.
Dimensional Modeling Business Intelligence Solutions.
Dimensional Modeling CS 543 – Data Warehousing. CS Data Warehousing (Sp ) - Asim LUMS2 From Requirements to Data Models.
Data Warehouse IMS5024 – presented by Eder Tsang.
Exploiting the DW data DW is a platform for creating a wide array of reports It solves data feed problems, but does not lead to specific decision support.
How to build your own… Super Model Dimensional Modelling for Analysis Services Darren Gosbell Principal Consultant - James & Monroe
Data Warehousing Design Transparencies
Data Warehousing ISYS 650. What is a data warehouse? A data warehouse is a subject-oriented, integrated, nonvolatile, time-variant collection of data.
Data Warehousing DSCI 4103 Dr. Mennecke Introduction and Chapter 1.
Designing a Data Warehouse
Principles of Dimensional Modeling
Lecture 5 CS.456 DATABASE DESIGN.
Designing a Data Warehouse Issues in DW design. Three Fundamental Processes Data Acquisition Data Storage Data a Access.
Week 6 Lecture The Data Warehouse Samuel Conn, Asst. Professor
DWH – Dimesional Modeling PDT Genči. 2 Outline Requirement gathering Fact and Dimension table Star schema Inside dimension table Inside fact table STAR.
Bogdan Shishedjiev Data Analysis1 Data Analysis OLTP and OLAP Data Warehouse SQL for Data Analysis Data Mining.
Dimensional Modeling Chapter 2. The Dimensional Data Model An alternative to the normalized data model Present information as simply as possible (easier.
Program Pelatihan Tenaga Infromasi dan Informatika Sistem Informasi Kesehatan Ari Cahyono.
1 Data Warehousing Lecture-13 Dimensional Modeling (DM) Virtual University of Pakistan Ahsan Abdullah Assoc. Prof. & Head Center for Agro-Informatics Research.
Data Warehousing Concepts, by Dr. Khalil 1 Data Warehousing Design Dr. Awad Khalil Computer Science Department AUC.
Database Systems: Design, Implementation, and Management Tenth Edition
Data Warehouse and Business Intelligence Dr. Minder Chen Fall 2009.
DIMENSIONAL MODELLING. Overview Clearly understand how the requirements definition determines data design Introduce dimensional modeling and contrast.
Babysitter Example Dimensional Modeling. Babysitter Service The MISSA Service Club wants to run a babysitting service. Customers call to request a sitter.
Chapter 1 Adamson & Venerable Spring Dimensional Modeling Dimensional Model Basics Fact & Dimension Tables Star Schema Granularity Facts and Measures.
Module 1: Introduction to Data Warehousing and OLAP
MIS2502: Data Analytics The Information Architecture of an Organization.
October 28, Data Warehouse Architecture Data Sources Operational DBs other sources Analysis Query Reports Data mining Front-End Tools OLAP Engine.
Decision Support and Date Warehouse Jingyi Lu. Outline Decision Support System OLAP vs. OLTP What is Date Warehouse? Dimensional Modeling Extract, Transform,
Dimensional Modeling Overview. Agenda ■ Dimensional Modeling Overview ■ Dimensional Modeling Steps ■ Dimensional Modeling Framework ■ Retail Sales - Case.
Normalized model vs dimensional model
Basic Model: Retail Grocery Store
CSS Data Warehousing for BS(CS) Lecture 1-2: DW & Need for DW Khurram Shahzad Department of Computer Science.
Designing a Data Warehousing System. Overview Business Analysis Process Data Warehousing System Modeling a Data Warehouse Choosing the Grain Establishing.
DW-2: Designing a Data Warehousing System 용 환승 이화여자대학교
UNIT-II Principles of dimensional modeling
Chapter 5 DATA WAREHOUSING Study Sections 5.2, 5.3, 5.5, Pages: & Snowflake schema.
Agile data warehouse design
Creating the Dimensional Model
Copyright© 2014, Sira Yongchareon Department of Computing, Faculty of Creative Industries and Business Lecturer : Dr. Sira Yongchareon ISCG 6425 Data Warehousing.
ITEC 3220M Using and Designing Database Systems Instructor: Prof. Z.Yang Course Website: c3220m.htm Office: TEL.
Last Updated : 26th may 2003 Center of Excellence Data Warehousing Introductionto Data Modeling.
The Need for Data Analysis 2 Managers track daily transactions to evaluate how the business is performing Strategies should be developed to meet organizational.
COMP 430 Intro. to Database Systems Denormalization & Dimensional Modeling.
3 Copyright © 2006, Oracle. All rights reserved. Business, Logical, and Dimensional Modeling.
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 9: DATA WAREHOUSING.
CMPE 226 Database Systems April 12 Class Meeting Department of Computer Engineering San Jose State University Spring 2016 Instructor: Ron Mak
Dimensional Modelling III
Data warehouse and OLAP
PRINCIPLES OF DIMENSIONAL MODELING
Chapter 13 The Data Warehouse
Overview and Fundamentals
Competing on Analytics II
Retail Sales is used to illustrate a first dimensional model
CMPE 226 Database Systems April 11 Class Meeting
MIS2502: Data Analytics Dimensional Data Modeling
Retail Sales is used to illustrate a first dimensional model
Dimensional Modeling.
MIS2502: Data Analytics Dimensional Data Modeling
Retail Sales is used to illustrate a first dimensional model
Dimensional Model January 16, 2003
Data Warehousing.
Presentation transcript:

1 Dimensional Modelling III

2 Dimensional Models A denormalized relational model Made up of tables with attributes Relationships defined by keys and foreign keys Organized for understandability and ease of reporting rather than update Queried and m aintained by SQL or special purpose management tools.

3 From Relational to Dimensional Relational Model Designed from the perspective of process efficiency  Marketing  Sales “Normalised” data structures  Entity Relationship Model Used for transactional, or operational systems  OLTP : OnLine Transaction Processing Based on data that is  Current  Non Redundant Dimensional Model Designed from the perspective of subject  Sales  Customers “De-normalised” data structures in blatant violation of normalisation Used for analysis of aggregated data  OLAP : OnLine Analytical Processing Based on data that is  Historical  May be redundant

4 ER vs. Dimensional Models One table per entity Minimize data redundancy Optimize update The Transaction Processing Model One fact table for data organization Maximize understandability Optimized for retrieval The data warehousing model

5 Strengths of the Dimensional Model Predictable, standard framework Respond well to changes in user reporting needs Relatively easy to add data without reloading tables Standard design approaches have been developed There exist a number of products supporting the dimensional model

6 A Transactional Database OrderDetails OrderDetailNo Amount OrderHeader OrderHeaderID FreightAmount OrderDate Products ProductID Description Size Addresses AddressID Street Countries CountryID Description Customers CustomerID FirstName LastName States StateID Desc

7 A Dimensional Model FactSales SalesAmount Products ProductID Description Size Subcategory Category Customers CustomerID Name Street State Country Time TimeID Date Month Quarter Year

8 Extract Transform Load RelationalDimensional Model Process OrientedSubject Oriented TransactionalAggregate CurrentHistoric

9 Facts & Dimensions There are two main types of objects in a dimensional model – Facts are quantitative measures that we wish to analyse and report on. – Dimensions contain textual descriptors of the business. They provide context for the facts.

10 Fact & Dimension Tables FACTS Contains two or more foreign keys Tend to have huge numbers of records Useful facts tend to be numeric and additive DIMENSIONS Contain text and descriptive information 1 in a 1-M relationship Generally the source of interesting constraints Typically contain the attributes for the SQL answer set.

11 GB Video E-R Diagram Requestor of Customer #Cust No F Name L Name Ads1 Ads2 City State Zip Tel No CC No Expire Rental #Rental No Date Clerk No Pay Type CC No Expire CC Approval Line #Line No Due Date Return Date OD charge Pay type Owner of Video #Video No One-day fee Extra days Weekend Title #Title No Name Vendor No Cost Name for Holder of

12 Customer CustID Cust No F Name L Name Customer CustID Cust No F Name L Name Rental RentalID Rental No Clerk No Store Pay Type Rental RentalID Rental No Clerk No Store Pay Type VideoRentalFact LineID OD Charge OneDayCharge ExtraDaysCharge WeekendCharge DaysReserved DaysOverdue LineNo VideoRentalFact LineID OD Charge OneDayCharge ExtraDaysCharge WeekendCharge DaysReserved DaysOverdue LineNo Video VideoID Video No Video VideoID Video No Title TitleID TitleNo Name Cost Vendor Name Title TitleID TitleNo Name Cost Vendor Name DateDim ActualDate DateID SQLDate Day Week Quarter Holiday DateDim ActualDate DateID SQLDate Day Week Quarter Holiday Address AddressID Adddress1 Address2 City State Zip AreaCode Phone Address AddressID Adddress1 Address2 City State Zip AreaCode Phone GB Video Data Mart CustID AddressID RentalId VideoID TitleID RentalDateID DueDateID ReturnDateID PK of the fact table: Return Date Due Date Rental Date May also use lineid as PK or the concatenated PK

13 Fact Table Measurements associated with a specific business process Grain: level of detail of the table Process events produce fact records Facts (attributes) are usually Numeric Additive Derived facts included Foreign (surrogate) keys refer to dimension tables (entities) Classification values help define subsets

14 Dimension Tables Entities describing the objects of the process Conformed dimensions cross processes Attributes are descriptive Text Numeric Surrogate keys Less volatile than facts (1:m with the fact table) Null entries Date dimensions Produce “by” questions

15 Business Model As always in life, there are some disadvantages to 3NF: Performance can be truly awful. Most of the work that is performed on denormalizing a data model is an attempt to reach performance objectives. The structure can be overwhelmingly complex. We may wind up creating many small relations which the user might think of as a single relation or group of data.

16 The 4 Step Design Process Choose the Data Mart Declare the Grain Choose the Dimensions Choose the Facts

17 Building a Data Warehouse from a Normalized Database The steps Develop a normalized entity-relationship business model of the data warehouse. Translate this into a dimensional model. This step reflects the information and analytical characteristics of the data warehouse. Translate this into the physical model. This reflects the changes necessary to reach the stated performance objectives.

18 Structural Dimensions The first step is the development of the structural dimensions. This step corresponds very closely to what we normally do in a relational database. The star architecture that we will develop here depends upon taking the central intersection entities as the fact tables and building the foreign key => primary key relations as dimensions.

19 Steps in dimensional modeling Select an associative entity for a fact table Determine granularity Replace operational keys with surrogate keys Promote the keys from all hierarchies to the fact table Add date dimension Split all compound attributes Add necessary categorical dimensions Fact (varies with time) / Attribute (constant)

20 Converting an E-R Diagram Determine the purpose of the mart Identify an association table as the central fact table Determine facts to be included Replace all keys with surrogate keys Promote foreign keys in related tables to the fact table Add time dimension Refine the dimension tables

21 Choosing the Mart A set of related fact and dimension tables Single source or multiple source Conformed dimensions Typically have a fact table for each process

22 Fact Tables Represent a process or reporting environment that is of value to the organization It is important to determine the identity of the fact table and specify exactly what it represents. Typically correspond to an associative entity in the E-R model

23 Grain (unit of analysis) The grain determines what each fact record represents: the level of detail. For example Individual transactions Snapshots (points in time) Line items on a document Generally better to focus on the smallest grain

24 Facts Measurements associated with fact table records at fact table granularity Normally numeric and additive Non-key attributes in the fact table Attributes in dimension tables are constants. Facts vary with the granularity of the fact table

25 Dimensions A table (or hierarchy of tables) connected with the fact table with keys and foreign keys Preferably single valued for each fact record (1:m) Connected with surrogate (generated) keys, not operational keys Dimension tables contain text or numeric attributes

26 ORDER orderdate STORE store_ID (PK) store_name address district floor_type CLERK clerk_id (PK) clerk_name clerk_grade CUSTOMER customer_ID (PK) customer_name purchase_profile credit_profile address PROMOTION promotion_NUM (PK) promotion_name price_type ad_type ORDER-LINE dollars_sold units_sold dollars_cost ERD PRODUCT SKU (PK) description brand category

27 TIME time_key (PK) SQL_date day_of_week month STORE store_key (PK) store_ID store_name address district floor_type CLERK clerk_key (PK) clerk_id clerk_name clerk_grade PRODUCT product_key (PK) SKU description brand category CUSTOMER customer_key (PK) customer_name purchase_profile credit_profile address PROMOTION promotion_key (PK) promotion_name price_type ad_type FACT {time_key|| store_key|| clerk_key || product_key || customer_key|| promotion_key} (PK) dollars_sold units_sold dollars_cost DIMENSONAL MODEL

28 Good Attributes Verbose Descriptive Complete Quality assured Indexed (b-tree vs bitmap) Equally available Documented

29 Date Dimensions

30

31 Snowflaking & Hierarchies Efficiency vs Space Understandability M:N relationships

32 Star Schema ProductID TimeID CustomerID SalesAmount factSales ProductID ProductName CategoryName SubCategoryName dimProduct … dimCustomer … dimTime

33 Snowflake Schema ProductID TimeID CustomerID SalesAmount factSales ProductID CategoryID Description dimProduct CategoryID subCategoryID Description dimCategory SubCategoryID Description dimSubCategory

34 Simple DW hierarchy pattern.