-
Marketplace
-
Channel Resources
Articles from this Site
A Scoring Model and Choice Model for Multistage Cross Selling in the Insurance Industry, Part 2
Lawrence Technological University Uses Metastorm ProVision
Information Builders to Extend WebFOCUS to Predictive Analysis
A Statistical Stocking Stuffer for the Holidays
What are your views on the advantages and/or disadvantages ETL tools and data modeling versus code?
White Papers
Best Practices: Eight Tips for Improving Your Professional Services Business
Metadata Management for Enterprise Applications
UML for C#
PHP Code Design
Domain-Specific Modeling: 10x Faster than UML
Web Seminars
Modeling Unstructured Data
Creative Strategies for Achieving 24/7 Uptime
Closing the Loop: Real-Time Event Detection and Response
Books
Data Mining Cookbook: Modeling Data for Marketing, Risk and Customer Relationship Management
Data Modeler's Workbench: Tools and Techniques for Analysis and Design
The Data Modeling Handbook: A Best-Practice Approach to Building Quality Data Models
Data Mining Using SAS Applications
Data Mining: Concepts, Models, Methods and Algorithms
Recursive Fact Table?
Design Challenge
To better understand the requirements for an analytics data mart, you and a business user are standing at the white board sketching a high-level data model. The user needs to report on telephone call metrics, and it is a requirement to know how many times each consumer calls on a given day for a given product. It is also a requirement to know whether the call is completely new or a follow-up from an existing call. That is, if Bob calls on Monday with a product complaint and calls Tuesday with more information on this same complaint and then calls again Wednesday with still more information, the user needs to know that Monday is a completely new call and Tuesday and Wednesdays calls are follow-ups. The high-level dimensional model you and the user came up with is shown in Figure 1. The recursive relationship on call volume captures the rule that each call can be a follow-up from a single new call, and each new call can have many follow-up calls.![]() |
| Figure 1: The Challenge |
The Challenge
This model looks great on a white board, but can a recursive relationship on a fact table actually be physically implemented? Describe how you would physically implement the users requirement.The Response
The responses received for this challenge fit into one of three categories. Keep the recursion. If your reporting tool (and users) can handle a recursive structure, one solution would be to implement this relationship by storing a parent foreign key in the call volume fact table. Art Trifonov, Oracle consultant, describes this solution and says for the original call the value of the foreign key PARENT_CALL_ID will be the same as CALL_ID, recording the original call as being its own parent. For follow-up calls, the parent foreign key can either contain the ultimate parent key (i.e., both Tuesdays and Wednesdays calls will point to Mondays original call) or the immediate parent (i.e., Tuesdays call will point to Mondays original call and Wednesdays call will point to Tuesdays call). A number of responses supported this solution, including those of Chan Beauvais, database analyst; Chris Strasser, CIO; and Gordon Everest, professor emeritus.Model only the current requirement. Many feel that data marts are throwaways. That is, existing only as long as the business questions they answer are still relevant, and, when the business questions change, the data mart can get recreated or replaced. This belief allows us to model the immediate reporting requirement instead of the more flexible recursive relationship shown on the logical model. The immediate requirement is to know how many times each consumer calls on a given day for a given product, and also whether the call is completely new or a follow-up from an existing call. Just storing the measure Call Quantity, and adding to the fact tables primary key the new data element Initial Call Indicator (Y = Initial Call and N = Follow-up Call) can meet this immediate requirement. A number of responses supported this solution, including those of Roy Guzman, data designer; Philip Kelley, database administrator; and Jeff Lawyer, senior data architect.
Steve Hoberman has worked as a business intelligence and data management practitioner and trainer since 1990. He is a Certified Business Intelligence Professional (CBIP), having achieved mastery level certification in data analysis and design. He is a popular and frequent presenter at industry conferences, both nationally and internationally. Hoberman is a columnist and frequent contributor to industry publications, as well as the author of Data Modeler's Workbench and Data Modeling Made Simple (available for purchase through the DM Review bookstore). He is the founder of the Design Challenges group, inventor of the Data Model Scorecard and a recognized innovator and thought leader in the field of data modeling. He can be reached at me@stevehoberman.com.
Graeme Simsion's latest book is out! Data Modeling Theory and Practice. Here's a link where you can read more about the book and purchase it at a discounted price.
For more information on related topics, visit the following channels:



