Factless Facts: Occurrences of Relationships or Events

Slides:



Advertisements
Similar presentations
Adv. DBMS & DW Chapter 9: Insurance Chapter 10: Factless Fact Tables
Advertisements

Dimensional Modeling.
SM101 - Registrations Session 3 of 5 An ACEware Presentation.
Attendance Module. After we take attendance... What will the Attendance Module do for you? Getting things going (setup) Recording Attendance Custom Records.
Chapter 3 Data Modeling Copyright © 2014 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent.
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
November R McFadyen1 Aggregation and Composition – section 27.2 both are associations used to denote that an object from one class is part.
Feb 18, R McFadyen1 Feb 18, 2002 Review of some modeling concepts Introduction of Moment-Interval.
Introduction to the SAP IMG Interface. Slide 2 Accessing the IMG Use transaction code SPRO or.
1 Figure 12.2 registration events in factless fact table Faculty Student Course Term Year termKey (FK) studentKey (FK) declaredMajorKey (FK) creditAttainmentKey.
Howard Paul. Sequential Access Index Files and Data File Random Access.
AOIT Database Design Unit 3, Lesson 9 Data Integrity Copyright © 2009–2011 National Academy Foundation. All rights reserved.
Contents Design Process Modeling Constraints E-R Diagram Design Issues
Database Design Chapters 17 and 18.
Unit 3 Review Learning Target: I will review the unit in preparation for an upcoming exam.
The Relational Database Model
The University of Delaware Higher Education Consortia
Chapter 2: Relational Model
Entity-Relationship Modeling
Mr C Johnston ICT Teacher
Exploring Microsoft Office Access
Introduction to Database Systems
Accounting Information Systems 9th Edition
Star Schema.
Assignment 2 Due Thursday Feb 9, 2006
Dimensional Model January 14, 2003
Inventory is used to illustrate:
CIS 336 strCompetitive Success/tutorialrank.com
CIS 336 str Education for Service-- tutorialrank.com.
Retail Sales is used to illustrate a first dimensional model
MIS2502: Data Analytics Dimensional Data Modeling
ERD’s REVIEW DBS201.
Normalization of Databases
Typically data is extracted from multiple sources
Data Modeling with Entity Relationship Diagrams (Cont.)
Minidimension Example
Flexible Spending City of Bowling Green.
Assignment 2 Due Thursday Feb 9, 2006
Database Design Chapters 17 and 18.
Hierarchy bridge tables (p 161+) Many-to-one-to-many join (p 169+)
Retail Sales is used to illustrate a first dimensional model
Database Systems Instructor Name: Lecture-9.
Data warehouse architecture CIF, DM Bus Matrix Star schema
Dimensional Modeling.
Aggregate Improvement and Lost, shrunken, and collapsed
Using Use Case Diagrams
MIS2502: Data Analytics Dimensional Data Modeling
Database Systems Instructor Name: Lecture-8.
The Relational Database Model
Point-in-time balances Physical database Aggregation ETL Architecture
Retail Sales is used to illustrate a first dimensional model
Role Playing Dimensions (p )
for Instructors and Roster Contacts
Dimensional Model January 16, 2003
CHAPTER 2 - Database Requirements and ER Modeling
Chapter 7: Entity-Relationship Model
Mapping an ERD to a Relational Database
for Instructors and Roster Contacts
Examines blended and separate transaction schemas
Review of Major Points Star schema Slowly changing dimensions Keys
Transaction fact table (figure 7.2)
Database Management system
Assignment 1 Due Thursday Jan 19, 2006
Faculty Center for Instructors
Information Systems in Organizations 2. 1
Exploring Microsoft Office Access
Review of Major Points Star schema Slowly changing dimensions Keys
Page 37 Figure 2.3, with attributes excluded
Recursive Relationship
Presentation transcript:

Factless Facts: Occurrences of Relationships or Events Pages 212-216 (Could be considered a fourth type of fact table) For each student we can measure the event of the student being enrolled in a program in a term Program Dimension Student Dimension StudentFact (=1) Term Dimension A metric that is always one, makes counting easier Feb 6, 2003 91.4904 Ron McFadyen

Heterogeneous Products in a Bank Pages 203-205 Household Facts account_key household_key branch_key product_key status_key time_key primary_balance transaction_count Many checking facts… Many saving facts… Many credit card facts… Many safe deposit facts… product_key product_description type category many checking attributes… many savings attributes… many credit card attributes… many safe deposit attributes… One approach with all variations provided for in a single fact table and single dimension table Feb 6, 2003 91.4904 Ron McFadyen

Heterogeneous Products in a Bank Custom Checking Facts account_key household_key branch_key product_key status_key time_key primary_balance transaction_count Many checking facts… product_key product_description type category many checking attributes… Custom Savings Facts product_key product_description type category many saving attributes… account_key household_key branch_key product_key status_key time_key primary_balance transaction_count Many savings facts… Another approach with custom fact and custom product dimensions, with a core fact and core dimension (next slide) Feb 6, 2003 91.4904 Ron McFadyen

Heterogeneous Products in a Bank Core Facts account_key household_key branch_key product_key status_key time_key primary_balance transaction_count Core dimension – limited number of attributes product_key product_description type category All the product dimensions can share the same surrogate/product key values Feb 6, 2003 91.4904 Ron McFadyen

Many-to-many dimensions Many-to-one-to-many traps Ch 6 Graduate Course … Read pages 217-231 Many-to-many dimensions Many-to-one-to-many traps Role playing dimensions Hierarchies A second assignment involves implementing each of these (any database system) Feb 6, 2003 91.4904 Ron McFadyen

Many-to-Many Dimensions Consider a typical DM for tracking student performance in courses: one record per student per course per term per instructor. Course Student Credit hours Grade obtained Faculty Term Feb 6, 2003 91.4904 Ron McFadyen

Many-to-Many Dimensions Suppose a course may be taught by a group of faculty members. That is, a fact row is logically related to 1 or more faculty rows. We can’t extend the fact table with more FKs because the number of faculty members per offering is variable. We don’t want to add more rows to the fact table... Course Student Credit hours Grade obtained m n Faculty Term Feb 6, 2003 91.4904 Ron McFadyen

Many-to-Many Dimensions We manage this situation with a bridge table Course Student 1 1 n n Credit hours Grade obtained TeachingBridge n 1 Term Faculty Feb 6, 2003 91.4904 Ron McFadyen

Many-to-Many Dimensions We manage this situation with a bridge table. The TeachingBridge table has PK {TeachingBridgeId, FacultyId} Credit hours Grade obtained TeachingBridge n 1 n 1 Faculty Feb 6, 2003 91.4904 Ron McFadyen

Many-to-Many Dimensions Text discusses a weighting factor used to distinguish the contribution each dimension participant makes to the group. In this case its probably 1/NumberOfMembers. Attributes in the physical TeachingBridge table are: TeachingBridgeId FacultyId WeightingFactor Faculty 1 n Credit hours Grade obtained TeachingBridge n 1 Feb 6, 2003 91.4904 Ron McFadyen

Many-to-Many Dimensions Visit (Encounter) Diagnosis DiagnosisGroupKey Patient Key ExamGroupKey Physician Key Time Key Patient Physician Time Exam Feb 6, 2003 91.4904 Ron McFadyen

Many-to-Many Dimensions Visit (Encounter) Diagnosis DiagnosisGroupKey Patient Key ExamGroupKey Physician Key Time Key Bridge Patient Bridge Physician Time Exam Feb 6, 2003 91.4904 Ron McFadyen

Role Playing Dimensions Consider a DM where we are tracking claims as they make their way through processing to payment or refusal We can track the date received, the date the accident occurred, the date of adjustment, the date of payment, as well as the policy holder, the policy, the claimed amount, the paid amount Accident Date Adjustment Date Receipt Date facts Payment Date PolicyHolder Policy Feb 6, 2003 91.4904 Ron McFadyen

Role Playing Dimensions A dimension appears several times, in different roles. We need to implement the dimension once, and reference it via several FKs. One must be careful with the SQL when retrieving data Accident Date Adjustment Date Receipt Date facts Payment Date PolicyHolder Policy Feb 6, 2003 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. Feb 6, 2003 91.4904 Ron McFadyen

Hierarchies A B X R Q W S Z Feb 6, 2003 91.4904 Ron McFadyen

Hierarchies Warehouse Product Customer Time Feb 6, 2003 91.4904 Ron McFadyen

Customer Navigation Bridge Hierarchies Warehouse Product Customer Navigation Bridge Time Customer Feb 6, 2003 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 Feb 6, 2003 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 Feb 6, 2003 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 Feb 6, 2003 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 Feb 6, 2003 91.4904 Ron McFadyen

What are the reasons for using these? Fact.custKey = Customer.custKey Hierarchies Fact table Customer Navigation Bridge custKey productKey timeKey warehouseKey facts custKey attribute1, attribute2, … parentCustKey subsiduaryCustKey numLevels leafFlag What are the reasons for using these? Fact.custKey = Customer.custKey Fact.custKey = Navigation.parentCustKey Fact.custKey = Navigation.subsiduaryCustKey Feb 6, 2003 91.4904 Ron McFadyen