The Data Warehouse Toolkit, 3rd Edition The Definitive Guide to Dimensional Modeling (Ralph Kimball, Margy Ross) (Z-Library)

Author: Ralph Kimball, Margy Ross

科学

The first edition of Ralph Kimball's The Data Warehouse Toolkit introduced the industry to dimensional modeling, and now his books are considered the most authoritative guides in this space. This new third edition is a complete library of updated dimensional modeling techniques, the most comprehensive collection ever. It covers new and enhanced star schema dimensional modeling patterns, adds two new chapters on ETL techniques, includes new and expanded business matrices for 12 case studies, and more.

📄 File Format: PDF
💾 File Size: 6.6 MB
18
Views
0
Downloads
0.00
Total Donations

📄 Text Preview (First 20 pages)

ℹ️

Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

📄 Page 1
(This page has no text content)
📄 Page 2
(This page has no text content)
📄 Page 3
The Data Warehouse Toolkit
📄 Page 4
(This page has no text content)
📄 Page 5
The Data Warehouse Toolkit Third Edition Ralph Kimball Margy Ross The Defi nitive Guide to Dimensional Modeling
📄 Page 6
The Data Warehouse Toolkit: The Defi nitive Guide to Dimensional Modeling, Third Edition Published by John Wiley & Sons, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2013 by Ralph Kimball and Margy Ross Published by John Wiley & Sons, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-1-118-53080-1 ISBN: 978-1-118-53077-1 (ebk) ISBN: 978-1-118-73228-1 (ebk) ISBN: 978-1-118-73219-9 (ebk) Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permit- ted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646- 8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions. Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or war- ranties with respect to the accuracy or completeness of the contents of this work and specifi cally disclaim all warranties, including without limitation warranties of fi tness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or website may provide or recommendations it may make. Further, readers should be aware that Internet websites listed in this work may have changed or disappeared between when this work was written and when it is read. For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002. Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on- demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com. For more informa- tion about Wiley products, visit www.wiley.com. Library of Congress Control Number: 2013936841 Trademarks: Wiley and the Wiley logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affi liates, in the United States and other countries, and may not be used without written per- mission. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book.
📄 Page 7
Ralph Kimball founded the Kimball Group. Since the mid-1980s, he has been the data warehouse and business intelligence industry’s thought leader on the dimen- sional approach. He has educated tens of thousands of IT professionals. The Toolkit books written by Ralph and his colleagues have been the industry’s best sellers since 1996. Prior to working at Metaphor and founding Red Brick Systems, Ralph coinvented the Star workstation, the fi rst commercial product with windows, icons, and a mouse, at Xerox’s Palo Alto Research Center (PARC). Ralph has a PhD in electrical engineering from Stanford University. Margy Ross is president of the Kimball Group. She has focused exclusively on data warehousing and business intelligence since 1982 with an emphasis on business requirements and dimensional modeling. Like Ralph, Margy has taught the dimen- sional best practices to thousands of students; she also coauthored fi ve Toolkit books with Ralph. Margy previously worked at Metaphor and cofounded DecisionWorks Consulting. She graduated with a BS in industrial engineering from Northwestern University. About the Authors
📄 Page 8
Executive Editor Robert Elliott Project Editor Maureen Spears Senior Production Editor Kathleen Wisor Copy Editor Apostrophe Editing Services Editorial Manager Mary Beth Wakefi eld Freelancer Editorial Manager Rosemarie Graham Associate Director of Marketing David Mayhew Marketing Manager Ashley Zurcher Business Manager Amy Knies Production Manager Tim Tate Vice President and Executive Group Publisher Richard Swadley Vice President and Executive Publisher Neil Edde Associate Publisher Jim Minatel Project Coordinator, Cover Katie Crocker Proofreader Word One, New York Indexer Johnna VanHoose Dinse Cover Image iStockphoto.com / teekid Cover Designer Ryan Sneed Credits
📄 Page 9
First, thanks to the hundreds of thousands who have read our Toolkit books, attended our courses, and engaged us in consulting projects. We have learned as much from you as we have taught. Collectively, you have had a profoundly positive impact on the data warehousing and business intelligence industry. Congratulations! Our Kimball Group colleagues, Bob Becker, Joy Mundy, and Warren Thornthwaite, have worked with us to apply the techniques described in this book literally thou- sands of times, over nearly 30 years of working together. Every technique in this book has been thoroughly vetted by practice in the real world. We appreciate their input and feedback on this book—and more important, the years we have shared as business partners, along with Julie Kimball. Bob Elliott, our executive editor at John Wiley & Sons, project editor Maureen Spears, and the rest of the Wiley team have supported this project with skill and enthusiasm. As always, it has been a pleasure to work with them. To our families, thank you for your unconditional support throughout our careers. Spouses Julie Kimball and Scott Ross and children Sara Hayden Smith, Brian Kimball, and Katie Ross all contributed in countless ways to this book. Acknowledgments
📄 Page 10
(This page has no text content)
📄 Page 11
Contents Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xxvii 1 Data Warehousing, Business Intelligence, and Dimensional Modeling Primer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Different Worlds of Data Capture and Data Analysis . . . . . . . . . . . . . . . . . . .2 Goals of Data Warehousing and Business Intelligence . . . . . . . . . . . . . . . . . .3 Publishing Metaphor for DW/BI Managers . . . . . . . . . . . . . . . . . . . . . . .5 Dimensional Modeling Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7 Star Schemas Versus OLAP Cubes  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8 Fact Tables for Measurements  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Dimension Tables for Descriptive Context . . . . . . . . . . . . . . . . . . . . . . 13 Facts and Dimensions Joined in a Star Schema . . . . . . . . . . . . . . . . . . . 16 Kimball’s DW/BI Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Operational Source Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Extract, Transformation, and Load System . . . . . . . . . . . . . . . . . . . . . . 19 Presentation Area to Support Business Intelligence. . . . . . . . . . . . . . . . 21 Business Intelligence Applications  . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 Restaurant Metaphor for the Kimball Architecture . . . . . . . . . . . . . . . .23 Alternative DW/BI Architectures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26 Independent Data Mart Architecture . . . . . . . . . . . . . . . . . . . . . . . . . .26 Hub-and-Spoke Corporate Information Factory Inmon Architecture  . .28 Hybrid Hub-and-Spoke and Kimball Architecture . . . . . . . . . . . . . . . . .29 Dimensional Modeling Myths. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30 Myth 1: Dimensional Models are Only for Summary Data . . . . . . . . . .30 Myth 2: Dimensional Models are Departmental, Not Enterprise  . . . . . 31 Myth 3: Dimensional Models are Not Scalable . . . . . . . . . . . . . . . . . . . 31 Myth 4: Dimensional Models are Only for Predictable Usage . . . . . . . . 31 Myth 5: Dimensional Models Can’t Be Integrated . . . . . . . . . . . . . . . . 32 More Reasons to Think Dimensionally  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Agile Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35
📄 Page 12
Contentsx 2 Kimball Dimensional Modeling Techniques Overview . . . . . . . . . 37 Fundamental Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Gather Business Requirements and Data Realities . . . . . . . . . . . . . . . . . 37 Collaborative Dimensional Modeling Workshops . . . . . . . . . . . . . . . . .38 Four-Step Dimensional Design Process . . . . . . . . . . . . . . . . . . . . . . . . .38 Business Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Grain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Dimensions for Descriptive Context . . . . . . . . . . . . . . . . . . . . . . . . . . .40 Facts for Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40 Star Schemas and OLAP Cubes  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40 Graceful Extensions to Dimensional Models . . . . . . . . . . . . . . . . . . . . . 41 Basic Fact Table Techniques  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Fact Table Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Additive, Semi-Additive, Non-Additive Facts  . . . . . . . . . . . . . . . . . . . . 42 Nulls in Fact Tables  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Conformed Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Transaction Fact Tables  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Periodic Snapshot Fact Tables  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Accumulating Snapshot Fact Tables . . . . . . . . . . . . . . . . . . . . . . . . . . .44 Factless Fact Tables  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44 Aggregate Fact Tables or OLAP Cubes . . . . . . . . . . . . . . . . . . . . . . . . . 45 Consolidated Fact Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Basic Dimension Table Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46 Dimension Table Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46 Dimension Surrogate Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46 Natural, Durable, and Supernatural Keys . . . . . . . . . . . . . . . . . . . . . . .46 Drilling Down  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Degenerate Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Denormalized Flattened Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Multiple Hierarchies in Dimensions  . . . . . . . . . . . . . . . . . . . . . . . . . . .48 Flags and Indicators as Textual Attributes . . . . . . . . . . . . . . . . . . . . . . .48 Null Attributes in Dimensions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48 Calendar Date Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48 Role-Playing Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 Junk Dimensions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49
📄 Page 13
Contents xi Snowfl aked Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50 Outrigger Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50 Integration via Conformed Dimensions  . . . . . . . . . . . . . . . . . . . . . . . . . . .50 Conformed Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Shrunken Dimensions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Drilling Across . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Value Chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Enterprise Data Warehouse Bus Architecture  . . . . . . . . . . . . . . . . . . . . 52 Enterprise Data Warehouse Bus Matrix . . . . . . . . . . . . . . . . . . . . . . . . . 52 Detailed Implementation Bus Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Opportunity/Stakeholder Matrix  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Dealing with Slowly Changing Dimension Attributes . . . . . . . . . . . . . . . . . 53 Type 0: Retain Original  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54 Type 1: Overwrite  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54 Type 2: Add New Row . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54 Type 3: Add New Attribute  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Type 4: Add Mini-Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Type 5: Add Mini-Dimension and Type 1 Outrigger . . . . . . . . . . . . . . . 55 Type 6: Add Type 1 Attributes to Type 2 Dimension. . . . . . . . . . . . . . .56 Type 7: Dual Type 1 and Type 2 Dimensions  . . . . . . . . . . . . . . . . . . . .56 Dealing with Dimension Hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56 Fixed Depth Positional Hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . .56 Slightly Ragged/Variable Depth Hierarchies . . . . . . . . . . . . . . . . . . . . . 57 Ragged/Variable Depth Hierarchies with Hierarchy Bridge Tables  . . . . 57 Ragged/Variable Depth Hierarchies with Pathstring Attributes . . . . . . . 57 Advanced Fact Table Techniques  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58 Fact Table Surrogate Keys. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58 Centipede Fact Tables  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58 Numeric Values as Attributes or Facts  . . . . . . . . . . . . . . . . . . . . . . . . . 59 Lag/Duration Facts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Header/Line Fact Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Allocated Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 Profi t and Loss Fact Tables Using Allocations  . . . . . . . . . . . . . . . . . . . .60 Multiple Currency Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 Multiple Units of Measure Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
📄 Page 14
Contentsxii Year-to-Date Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Multipass SQL to Avoid Fact-to-Fact Table Joins . . . . . . . . . . . . . . . . . . 61 Timespan Tracking in Fact Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62 Late Arriving Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62 Advanced Dimension Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62 Dimension-to-Dimension Table Joins . . . . . . . . . . . . . . . . . . . . . . . . . .62 Multivalued Dimensions and Bridge Tables  . . . . . . . . . . . . . . . . . . . . . 63 Time Varying Multivalued Bridge Tables  . . . . . . . . . . . . . . . . . . . . . . . 63 Behavior Tag Time Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Behavior Study Groups  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64 Aggregated Facts as Dimension Attributes . . . . . . . . . . . . . . . . . . . . . .64 Dynamic Value Bands  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64 Text Comments Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65 Multiple Time Zones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65 Measure Type Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65 Step Dimensions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65 Hot Swappable Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66 Abstract Generic Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66 Audit Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66 Late Arriving Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Special Purpose Schemas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Supertype and Subtype Schemas for Heterogeneous Products  . . . . . . 67 Real-Time Fact Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68 Error Event Schemas  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68 3 Retail Sales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Four-Step Dimensional Design Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Step 1: Select the Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Step 2: Declare the Grain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71 Step 3: Identify the Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72 Step 4: Identify the Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72 Retail Case Study  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72 Step 1: Select the Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Step 2: Declare the Grain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Step 3: Identify the Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
📄 Page 15
Contents xiii Step 4: Identify the Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 Dimension Table Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79 Date Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79 Product Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 Store Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Promotion Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89 Other Retail Sales Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Degenerate Dimensions for Transaction Numbers . . . . . . . . . . . . . . . . 93 Retail Schema in Action  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94 Retail Schema Extensibility  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Factless Fact Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Dimension and Fact Table Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98 Dimension Table Surrogate Keys  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98 Dimension Natural and Durable Supernatural Keys  . . . . . . . . . . . . . . 100 Degenerate Dimension Surrogate Keys  . . . . . . . . . . . . . . . . . . . . . . . 101 Date Dimension Smart Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Fact Table Surrogate Keys. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Resisting Normalization Urges  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 Snowfl ake Schemas with Normalized Dimensions . . . . . . . . . . . . . . . 104 Outriggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 Centipede Fact Tables with Too Many Dimensions . . . . . . . . . . . . . . . 108 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 4 Inventory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  111 Value Chain Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 Inventory Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Inventory Periodic Snapshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Inventory Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 Inventory Accumulating Snapshot . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Fact Table Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Transaction Fact Tables  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Periodic Snapshot Fact Tables  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Accumulating Snapshot Fact Tables . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Complementary Fact Table Types  . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
📄 Page 16
Contentsxiv Value Chain Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Enterprise Data Warehouse Bus Architecture . . . . . . . . . . . . . . . . . . . . . . . 123 Understanding the Bus Architecture  . . . . . . . . . . . . . . . . . . . . . . . . . 124 Enterprise Data Warehouse Bus Matrix . . . . . . . . . . . . . . . . . . . . . . . . 125 Conformed Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 Drilling Across Fact Tables  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 Identical Conformed Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Shrunken Rollup Conformed Dimension with Attribute Subset  . . . . . 132 Shrunken Conformed Dimension with Row Subset  . . . . . . . . . . . . . . 132 Shrunken Conformed Dimensions on the Bus Matrix . . . . . . . . . . . . . 134 Limited Conformity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 Importance of Data Governance and Stewardship . . . . . . . . . . . . . . . 135 Conformed Dimensions and the Agile Movement . . . . . . . . . . . . . . . 137 Conformed Facts  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 5 Procurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  141 Procurement Case Study  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 Procurement Transactions and Bus Matrix  . . . . . . . . . . . . . . . . . . . . . . . . 142 Single Versus Multiple Transaction Fact Tables . . . . . . . . . . . . . . . . . . 143 Complementary Procurement Snapshot. . . . . . . . . . . . . . . . . . . . . . . 147 Slowly Changing Dimension Basics  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Type 0: Retain Original  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 Type 1: Overwrite  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Type 2: Add New Row . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 Type 3: Add New Attribute  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 Type 4: Add Mini-Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 Hybrid Slowly Changing Dimension Techniques . . . . . . . . . . . . . . . . . . . . 159 Type 5: Mini-Dimension and Type 1 Outrigger  . . . . . . . . . . . . . . . . . 160 Type 6: Add Type 1 Attributes to Type 2 Dimension. . . . . . . . . . . . . . 160 Type 7: Dual Type 1 and Type 2 Dimensions  . . . . . . . . . . . . . . . . . . . 162 Slowly Changing Dimension Recap  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
📄 Page 17
Contents xv 6 Order Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  167 Order Management Bus Matrix  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Order Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Fact Normalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 Dimension Role Playing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 Product Dimension Revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Customer Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 Deal Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 Degenerate Dimension for Order Number . . . . . . . . . . . . . . . . . . . . . 178 Junk Dimensions  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 Header/Line Pattern to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 Multiple Currencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 Transaction Facts at Different Granularity  . . . . . . . . . . . . . . . . . . . . . 184 Another Header/Line Pattern to Avoid . . . . . . . . . . . . . . . . . . . . . . . . 186 Invoice Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Service Level Performance as Facts, Dimensions, or Both . . . . . . . . . . 188 Profi t and Loss Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 Audit Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 Accumulating Snapshot for Order Fulfi llment Pipeline  . . . . . . . . . . . . . . . 194 Lag Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 Multiple Units of Measure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 Beyond the Rearview Mirror  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 7 Accounting  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 Accounting Case Study and Bus Matrix  . . . . . . . . . . . . . . . . . . . . . . . . . . 202 General Ledger Data  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 General Ledger Periodic Snapshot . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 Chart of Accounts  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 Period Close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .204 Year-to-Date Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .206 Multiple Currencies Revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .206 General Ledger Journal Transactions  . . . . . . . . . . . . . . . . . . . . . . . . .206
📄 Page 18
Contentsxvi Multiple Fiscal Accounting Calendars . . . . . . . . . . . . . . . . . . . . . . . . .208 Drilling Down Through a Multilevel Hierarchy . . . . . . . . . . . . . . . . . .209 Financial Statements  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209 Budgeting Process  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 Dimension Attribute Hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 Fixed Depth Positional Hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 Slightly Ragged Variable Depth Hierarchies . . . . . . . . . . . . . . . . . . . . 214 Ragged Variable Depth Hierarchies  . . . . . . . . . . . . . . . . . . . . . . . . . . 215 Shared Ownership in a Ragged Hierarchy  . . . . . . . . . . . . . . . . . . . . . 219 Time Varying Ragged Hierarchies  . . . . . . . . . . . . . . . . . . . . . . . . . . .220 Modifying Ragged Hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .220 Alternative Ragged Hierarchy Modeling Approaches . . . . . . . . . . . . . 221 Advantages of the Bridge Table Approach for Ragged Hierarchies . . .223 Consolidated Fact Tables  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 Role of OLAP and Packaged Analytic Solutions . . . . . . . . . . . . . . . . . . . . .226 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .227 8 Customer Relationship Management . . . . . . . . . . . . . . . . . . . . 229 CRM Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .230 Operational and Analytic CRM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 Customer Dimension Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 Name and Address Parsing  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 International Name and Address Considerations  . . . . . . . . . . . . . . . . 236 Customer-Centric Dates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .238 Aggregated Facts as Dimension Attributes . . . . . . . . . . . . . . . . . . . . . 239 Segmentation Attributes and Scores  . . . . . . . . . . . . . . . . . . . . . . . . . 240 Counts with Type 2 Dimension Changes . . . . . . . . . . . . . . . . . . . . . . 243 Outrigger for Low Cardinality Attribute Set . . . . . . . . . . . . . . . . . . . . 243 Customer Hierarchy Considerations . . . . . . . . . . . . . . . . . . . . . . . . . .244 Bridge Tables for Multivalued Dimensions  . . . . . . . . . . . . . . . . . . . . . . . . 245 Bridge Table for Sparse Attributes  . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 Bridge Table for Multiple Customer Contacts . . . . . . . . . . . . . . . . . . . 248 Complex Customer Behavior  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 Behavior Study Groups for Cohorts . . . . . . . . . . . . . . . . . . . . . . . . . . 249
📄 Page 19
Contents xvii Step Dimension for Sequential Behavior . . . . . . . . . . . . . . . . . . . . . . . 251 Timespan Fact Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 Tagging Fact Tables with Satisfaction Indicators . . . . . . . . . . . . . . . . .254 Tagging Fact Tables with Abnormal Scenario Indicators . . . . . . . . . . .255 Customer Data Integration Approaches . . . . . . . . . . . . . . . . . . . . . . . . . .256 Master Data Management Creating a Single Customer Dimension  . .256 Partial Conformity of Multiple Customer Dimensions . . . . . . . . . . . . .258 Avoiding Fact-to-Fact Table Joins . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 Low Latency Reality Check  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .260 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 9 Human Resources Management . . . . . . . . . . . . . . . . . . . . . . . . 263 Employee Profi le Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 Precise Effective and Expiration Timespans  . . . . . . . . . . . . . . . . . . . . 265 Dimension Change Reason Tracking  . . . . . . . . . . . . . . . . . . . . . . . . .266 Profi le Changes as Type 2 Attributes or Fact Events . . . . . . . . . . . . . . 267 Headcount Periodic Snapshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 Bus Matrix for HR Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .268 Packaged Analytic Solutions and Data Models . . . . . . . . . . . . . . . . . . . . . 270 Recursive Employee Hierarchies  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 Change Tracking on Embedded Manager Key . . . . . . . . . . . . . . . . . . 272 Drilling Up and Down Management Hierarchies  . . . . . . . . . . . . . . . . 273 Multivalued Skill Keyword Attributes  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 Skill Keyword Bridge  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 Skill Keyword Text String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 Survey Questionnaire Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 Text Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 10 Financial Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 Banking Case Study and Bus Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 Dimension Triage to Avoid Too Few Dimensions . . . . . . . . . . . . . . . . . . . . 283 Household Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .286 Multivalued Dimensions and Weighting Factors . . . . . . . . . . . . . . . . . 287
📄 Page 20
Contentsxviii Mini-Dimensions Revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .289 Adding a Mini-Dimension to a Bridge Table . . . . . . . . . . . . . . . . . . . .290 Dynamic Value Banding of Facts  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 Supertype and Subtype Schemas for Heterogeneous Products . . . . . . . . . 293 Supertype and Subtype Products with Common Facts  . . . . . . . . . . . 295 Hot Swappable Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296 11 Telecommunications  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 Telecommunications Case Study and Bus Matrix  . . . . . . . . . . . . . . . . . . . 297 General Design Review Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . .299 Balance Business Requirements and Source Realities  . . . . . . . . . . . . .300 Focus on Business Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .300 Granularity  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .300 Single Granularity for Facts  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 Dimension Granularity and Hierarchies  . . . . . . . . . . . . . . . . . . . . . . . 301 Date Dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 Degenerate Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 Surrogate Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 Dimension Decodes and Descriptions . . . . . . . . . . . . . . . . . . . . . . . . 303 Conformity Commitment  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .304 Design Review Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .304 Draft Design Exercise Discussion  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .306 Remodeling Existing Data Structures  . . . . . . . . . . . . . . . . . . . . . . . . . . . .309 Geographic Location Dimension  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 12 Transportation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  311 Airline Case Study and Bus Matrix  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 Multiple Fact Table Granularities  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 Linking Segments into Trips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 Related Fact Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 Extensions to Other Industries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 Cargo Shipper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 Travel Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
The above is a preview of the first 20 pages. Register to read the complete e-book.

💝 Support Author

0.00
Total Amount (¥)
0
Donation Count

Login to support the author

Login Now
Back to List