Hierarchy bridge tables (p 161+) Many-to-one-to-many join (p 169+)

Slides:



Advertisements
Similar presentations
Dimensional Modeling.
Advertisements

Multidimensional Data
Multidimensional Data. Many applications of databases are "geographic" = 2­dimensional data. Others involve large numbers of dimensions. Example: data.
March 2010ACS-4904 Ron McFadyen1 Indexes B-tree index Bitmapped index Bitmapped join index A data warehousing DBMS will likely provide these, or variations,
© Ron McFadyen1 Many-to-one-to-many We need information that can only be obtained by accessing two fact tables through a common dimension … drilling across.
Multidimensional Data Many applications of databases are ``geographic'' = 2­dimensional data. Others involve large numbers of dimensions. Example: data.
Warm Up 1. 2(w + 1) 2. 3x(x2 – 4) 2w + 2 3x3 – 12x 3. 4h2 and 6h 2h
Chapter 8: Factoring.
Splash Screen. Lesson Menu Five-Minute Check (over Lesson 8–2) CCSS Then/Now New Vocabulary Example 1: The Distributive Property Key Concept: FOIL Method.
Example 1 The Distributive Property A. Find (y + 8)(y – 4). Vertical Method Multiply by –4. y + 8 (×) y – 4 –4y – 32–4(y + 8) = –4y – 32 Multiply by y.
Introduction to Databases A line manager asks, “If data unorganized is like matter unorganized and God created the heavens and earth in six days, how come.
BI Terminologies.
Intermediate Tier - Algebra revision Contents : Collecting like terms Multiplying terms together Indices Expanding single brackets Expanding double.
DEFINING the BUSINESS REQUIREMENTS. Introduction OLTP and DW planning is different in term of requirements clarity Planning DW is about solving users’
CS 345: Topics in Data Warehousing
Introduction to the SAP IMG Interface. Slide 2 Accessing the IMG Use transaction code SPRO or.
Hierarchical Retrieval Fresher Learning Program December, 2011.
Copyright © 2008 Elzbieta Malinowski & Esteban Zimányi 1 Chapter 3 Conventional Data Warehouses.
Splash Screen. Lesson Menu Five-Minute Check (over Lesson 8–2) CCSS Then/Now New Vocabulary Example 1: The Distributive Property Key Concept: FOIL Method.
All DBMSs provide variations of b-trees for indexing B-tree index
CS203 Lecture 14. Hashing An object may contain an arbitrary amount of data, and searching a data structure that contains many large objects is expensive.
Week 11 – Data Warehouse INFOSYS 222.
Lesson 6.1 Factoring by Greatest Common Factor
Microsoft Excel 2007 The L Line The Express Line to Learning L Line
Using Partitions and Fragments
Week 5 Vocabulary Quantitative Observation Qualitative Observation
Star Schema.
Recursion in SQL Basic recursive WITH statement ― Demo.
Assignment 2 Due Thursday Feb 9, 2006
Dimensional Model January 14, 2003
Inventory is used to illustrate:
CIS 336 Competitive Success/snaptutorial.com
CIS 336 strCompetitive Success/tutorialrank.com
CIS 336 PAPERS Education Your Life-- cis336papers.com.
CIS 336 Lessons in Excellence-- cis336.com. CIS 336 Final Exam (Feb 2016) For more course tutorials visit CIS 336 Final Exam Question 1.
CIS 336 Education for Service-- snaptutorial.com.
CIS 336 str Education for Service-- tutorialrank.com.
CIS 336 Teaching Effectively-- snaptutorial.com
Retail Sales is used to illustrate a first dimensional model
Implementing Data Models & Reports with Microsoft SQL Server
ERD’s REVIEW DBS201.
Data warehouse Design Using Oracle
5.4 Factoring Quadratic Expressions
Physical Storage Indexes Partitions Materialized views March 2004
Before: February 5, 2018 Factor each polynomial. Check your answer.
Physical Storage Indexes Partitions Materialized views March 2006
Physical Storage materialized views indexes partitions ETL CDC.
Minidimension Example
Assignment 2 Due Thursday Feb 9, 2006
Retail Sales is used to illustrate a first dimensional model
Physical Storage Indexes Partitions Materialized views March 2005
Data warehouse architecture CIF, DM Bus Matrix Star schema
Dimensional Modeling.
Aggregate Improvement and Lost, shrunken, and collapsed
Factless Facts: Occurrences of Relationships or Events
Retail Sales is used to illustrate a first dimensional model
Role Playing Dimensions (p )
Dimensional Model January 16, 2003
Row-equivalences again
Aggregate improvement Lost, shrunken, and collapsed Ralph Kimball
Examines blended and separate transaction schemas
分级取回数据 Schedule: Timing Topic 30 minutes Lecture 20 minutes Practice
Review of Major Points Star schema Slowly changing dimensions Keys
Transaction fact table (figure 7.2)
Assignment 1 Due Thursday Jan 19, 2006
Recuperação de Informação B
Review of Major Points Star schema Slowly changing dimensions Keys
Legacy Databases.
Page 37 Figure 2.3, with attributes excluded
Recursive Relationship
Presentation transcript:

Hierarchy bridge tables (p 161+) Many-to-one-to-many join (p 169+) Ch 5 Ideas Mini dimensions (p 154+) Hierarchy bridge tables (p 161+) Many-to-one-to-many join (p 169+) February 2004 91.4904 Ron McFadyen

Rapidly Changing Monster Dimensions If a dimension becomes too large Split some attributes off into a new dimension, creating a minidimension Customer dimension has attributes removed Customer key Last name First name … Age Gender Income level Customer key Last name First name … Age Gender Income level A new dimension is created February 2004 91.4904 Ron McFadyen

Minidimension dimensions Fact table Customer key Last name First name … Customer key Demographics key Other keys facts Demographics key Age Gender Income level Demographics minidimension Another FK February 2004 91.4904 Ron McFadyen

Customer organizations are often hierarchically structured Hierarchies Customer organizations are often hierarchically structured Customer 1 Customer 2 Customer 7 Customer 3 Customer 4 Customer 8 Customer 5 Customer 6 February 2004 91.4904 Ron McFadyen

To facilitate access to facts to answer questions such as Bridge table To facilitate access to facts to answer questions such as How much business do we do with Customer X (and its subsiduaries)? we introduce a helper/bridge table Customer bridge Parent customer key Subsidiary customer key Levels from parent Level name Bottom flag Top flag One row in the bridge table for each pair of nodes along the path from root to a leaf February 2004 91.4904 Ron McFadyen

We can access facts in any one of three ways Bridge table We can access facts in any one of three ways 1 Customer Customer bridge Fact table Customer key … Parent customer key Subsidiary customer key … … Customer key February 2004 91.4904 Ron McFadyen

We can access facts in any one of three ways Bridge table We can access facts in any one of three ways 2 Customer Customer bridge Fact table Customer key … Parent customer key Subsidiary customer key … … Customer key February 2004 91.4904 Ron McFadyen

We can access facts in any one of three ways Bridge table We can access facts in any one of three ways 3 Customer Fact table Customer key … … Customer key The bridge table is optional – we can use it, or not Question: could we apply this to the employee hierarchy in Northwind? February 2004 91.4904 Ron McFadyen

Hierarchies Suppose the companies that an organization deals with are often parts of other larger companies that can be expressed as a hierarchical structure Suppose that the companies an organization deals with are not just the ones at the bottom of the hierarchy, they could be any level If we have a regular Customer dimension, then there are some analyses that we cannot do. For instance, how much business do we do with X, where X includes its subordinate companies too. February 2004 91.4904 Ron McFadyen

Hierarchies A B X R Q W S Z February 2004 91.4904 Ron McFadyen

Hierarchies Warehouse Product Customer Time February 2004 91.4904 Ron McFadyen

Customer Navigation Bridge Hierarchies Warehouse Product Customer Navigation Bridge Time Customer February 2004 91.4904 Ron McFadyen

Customer Navigation Bridge Hierarchies Attributes: custKey productKey timeKey warehouseKey facts Attributes: parentCustKey subsiduaryCustKey numLevels leafFlag Warehouse Product Customer Navigation Bridge Time Customer February 2004 91.4904 Ron McFadyen

For our previous case we have 20 entries: Hierarchies The bridge table here will have one row for each parent/child combination (including parent=child) For our previous case we have 20 entries: A AB AQ AW AZ AX AR AS BQ BW BZ WZ RS AA BB QQ WW ZZ XX RR SS B X R Q W S Z February 2004 91.4904 Ron McFadyen

Hierarchies AB1N AQ2Y AW2N AZ3Y AX1Y AR1N AS2Y BQ1Y BW1N BZ2Y WZ1Y Attributes: parentCustKey subsiduaryCustKey numLevels leafFlag AB1N AQ2Y AW2N AZ3Y AX1Y AR1N AS2Y BQ1Y BW1N BZ2Y WZ1Y RS1Y AA0N BB0N QQ0Y WW0N ZZ0Y XX0Y RR0N SS0Y February 2004 91.4904 Ron McFadyen

Three ways we can join the Fact table to Customer: Hierarchies Fact table Customer Navigation Bridge custKey productKey timeKey warehouseKey facts custKey attribute1, attribute2, … parentCustKey subsiduaryCustKey numLevels leafFlag Three ways we can join the Fact table to Customer: Fact.custKey = Customer.custKey Fact.custKey = Navigation.parentCustKey Fact.custKey = Navigation.subsiduaryCustKey February 2004 91.4904 Ron McFadyen

Many-to-one-to-many We need information that can only be obtained by accessing two fact tables through a common dimension Fact table1 Dimension table Fact table2 … dim key dim key … … dim key Multipass SQL: each fact table is queried independently and the results combined/merged February 2004 91.4904 Ron McFadyen