Data Warehouses: A Whistle-Stop Tour Cade Roux [email_address]
How did I get here?
Typical Business "Design"
Typical Goal Scenario
What happened?
What success still looks like - version 1
What success still looks like - version 2
What success should look like
Dimensional Modeling
Normal Form
The intuitive resolution of contemporary design problems simply lies beyond the reach of a single individual’s integrative...
Facts and Dimensions
 
Best Practices <ul><li>There are tons of top ten lists of tips and keys to success in articles and books.  I will give you...
Worst Practices <ul><li>Again, there are plenty of online tips – every one of the best practices has a corresponding anti-...
Links <ul><li>Email:  [email_address] </li></ul><ul><li>Twitter:  @caderoux </li></ul><ul><li>Bookmarks:  http://delicious...
Q&A
Glossary <ul><li>Data warehouse </li></ul><ul><li>Bill Inmon - &quot;A warehouse is a subject-oriented, integrated, time-v...
Glossary (2) <ul><li>ETL </li></ul><ul><li>Extract...Transform...Load </li></ul><ul><li>Shorthand for any number of ways o...
Glossary (3) <ul><li>Facts </li></ul><ul><li>Dimensions </li></ul><ul><li>Conformed Dimensions </li></ul><ul><li>Slowly Ch...
Glossary (4) <ul><li>Business Intelligence </li></ul><ul><li>Single version of the truth </li></ul><ul><li>These are relat...
Glossary (5) <ul><li>Data Mart </li></ul><ul><li>Silos </li></ul><ul><li>Silos are mini-data warehouses that are specializ...
Glossary (6) <ul><li>Operational Data Store </li></ul><ul><li>Enterprise data warehouse </li></ul><ul><li>ODS is a place w...
Glossary (7) <ul><li>OLTP </li></ul><ul><li>OLAP </li></ul><ul><li>OnLine Transaction Processing: Typical online systems, ...
Dimensional Modelling <ul><li>Facts: </li></ul><ul><li>Usually scalar quantities </li></ul><ul><li>Typically can be: </li>...
Topics <ul><li>Conformed dimensions </li></ul><ul><li>NULLs </li></ul><ul><li>Junk Dimensions </li></ul><ul><li>Too Few Di...
Conformed Dimensions <ul><li>Reduces the learning curve </li></ul><ul><li>Allows models to be combined </li></ul><ul><li>A...
Some things to keep in mind <ul><li>Terminology is confusing and inconsistent – only your architecture matters – keep eyes...
NULLs <ul><li>Usually represent unknowns </li></ul><ul><li>Big problem for users in face of model evolution </li></ul><ul>...
Performance Issues <ul><li>Cleansing/Manipulation: </li></ul><ul><li>Y/N, M/F, Codes – standardize in the ETL, use data ty...
Application Logic <ul><li>Shared work should be pushed into ETL when: </li></ul><ul><li>Not likely to change </li></ul><ul...
 
 
Upcoming SlideShare
Loading in …5
×

Data Warehousing for Gnocode

389 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Data Warehousing for Gnocode

  1. 1. Data Warehouses: A Whistle-Stop Tour Cade Roux [email_address]
  2. 2. How did I get here?
  3. 3. Typical Business &quot;Design&quot;
  4. 4. Typical Goal Scenario
  5. 5. What happened?
  6. 6. What success still looks like - version 1
  7. 7. What success still looks like - version 2
  8. 8. What success should look like
  9. 9. Dimensional Modeling
  10. 10. Normal Form
  11. 11. The intuitive resolution of contemporary design problems simply lies beyond the reach of a single individual’s integrative grasp… … there are bounds to man’s cognitive and creative capacity… … the very frequent failure of individual designers to produce well organized forms suggests strongly that there are limits to the individual designer’s capacity. Christopher Alexander – Notes on the Synthesis of Form, Introduction: The Need for Rationality
  12. 12. Facts and Dimensions
  13. 14. Best Practices <ul><li>There are tons of top ten lists of tips and keys to success in articles and books. I will give you my top two. </li></ul><ul><li>Incremental Delivery – Show successes early, win people over, prove concepts and approach </li></ul><ul><li>Proactively Manage Quality - Test thoroughly and automate – Testing is usually considered important, but people don’t approach it systematically. Round-trip the data, know the dimensional behavior with benchmarking, automate exception reporting and make sure false positives don’t make your warning system too noisy. Get confidence by showing the tests are working. Add tests as defects are found, documenting expectations. </li></ul>
  14. 15. Worst Practices <ul><li>Again, there are plenty of online tips – every one of the best practices has a corresponding anti-practice, but these are my top two. </li></ul><ul><li>Avoid understanding the data, the business motivations, or the details because there are far too many feeds of data coming into the warehouse. Avoid looking ahead to how the data will be used because you shouldn’t change the ETL process to accommodate expectations or provide services. </li></ul><ul><li>Handle every model the same way, so the data warehouse is consistent, even if some models are awkward and difficult for users to use and difficult to change over time as the business evolves. </li></ul>
  15. 16. Links <ul><li>Email: [email_address] </li></ul><ul><li>Twitter: @caderoux </li></ul><ul><li>Bookmarks: http://delicious.com/caderoux1/gnocode-dw </li></ul><ul><li>Rate this presentation: </li></ul><ul><li>http://www.speakerrate.com/caderoux </li></ul><ul><li>My Resume: </li></ul><ul><li>http://careers.stackoverflow.com/caderoux </li></ul>
  16. 17. Q&A
  17. 18. Glossary <ul><li>Data warehouse </li></ul><ul><li>Bill Inmon - &quot;A warehouse is a subject-oriented, integrated, time-variant and non-volatile collection of data in support of management's decision making process&quot; - typically associated with top-down design </li></ul><ul><li>Ralph Kimball - &quot;A copy of transaction data specifically structured for query and analysis.&quot; - Typically associated with bottom-up design </li></ul>
  18. 19. Glossary (2) <ul><li>ETL </li></ul><ul><li>Extract...Transform...Load </li></ul><ul><li>Shorthand for any number of ways of getting the data into the warehouse. </li></ul><ul><li>Sometimes it's really transform...extract...load, sometimes it's extract...load...transform...load. </li></ul><ul><li>Key things are to have a strategy and principles for when data is changed/cleaned/conformed/exceptions reported. </li></ul>
  19. 20. Glossary (3) <ul><li>Facts </li></ul><ul><li>Dimensions </li></ul><ul><li>Conformed Dimensions </li></ul><ul><li>Slowly Changing Dimensions </li></ul><ul><li>Granularity </li></ul><ul><li>Dimensionally modelled data is mostly associated with Kimball. </li></ul><ul><li>Huge advantages in analyzing large amounts of data. </li></ul><ul><li>Modelling is problematic, but not nearly as hard as normalizing a non-normalized database. </li></ul>
  20. 21. Glossary (4) <ul><li>Business Intelligence </li></ul><ul><li>Single version of the truth </li></ul><ul><li>These are relatively meaningless, but they point to the problem trying to be solved: </li></ul><ul><li>Get good decision support information to the business - every business is different, and there isn't a silver bullet </li></ul><ul><li>Eliminate, as much as possible, the ability for users to generate inconsistent information from the same data </li></ul>
  21. 22. Glossary (5) <ul><li>Data Mart </li></ul><ul><li>Silos </li></ul><ul><li>Silos are mini-data warehouses that are specialized to a subject area - typically from a bottom-up approach. </li></ul><ul><li>Data Marts are the components of a data warehouse in the top-down design, the building blocks of a data warehouse in a bottom-up design. </li></ul><ul><li>Typically, you cannot really do JUST top-down or JUST bottom-up.  The reality is always hybrid, because you have to look forward to enterprise-level integration. </li></ul>
  22. 23. Glossary (6) <ul><li>Operational Data Store </li></ul><ul><li>Enterprise data warehouse </li></ul><ul><li>ODS is a place where data is combined before load.  Sometimes there are services performed off this.  Typically, the data model has not changed dramatically from the original operational source systems, but it is (another) copy of the data. </li></ul><ul><li>EDW is an Inmon term which means that the data warehouse covers the enterprise in an integrated fashion.  It is mainly used to distinguish from a data warehouse which does not cover the entire enterprise. </li></ul>
  23. 24. Glossary (7) <ul><li>OLTP </li></ul><ul><li>OLAP </li></ul><ul><li>OnLine Transaction Processing: Typical online systems, may maintain coherent temporal history, may overwrite themselves when data is changed, usually modelled in third normal form or better, Entity-Relationship modeling. </li></ul><ul><li>OnLine Analytical Processing: Fast analysis of multi-dimensional data - generally refers to tools running against dimensional data warehouses because the dimensions are explicit - often precalculated &quot;cubes&quot; are created </li></ul>
  24. 25. Dimensional Modelling <ul><li>Facts: </li></ul><ul><li>Usually scalar quantities </li></ul><ul><li>Typically can be: </li></ul><ul><li>SUM, AVG, etc. </li></ul><ul><li>Modelling: </li></ul><ul><li>View all data as either facts or dimensions </li></ul><ul><li>Determine the nature of the changes in the dimensions </li></ul><ul><li>Then divide up dimensions for convenience - based on usage/data patterns </li></ul><ul><li>Combination of art and science </li></ul>
  25. 26. Topics <ul><li>Conformed dimensions </li></ul><ul><li>NULLs </li></ul><ul><li>Junk Dimensions </li></ul><ul><li>Too Few Dimensions </li></ul><ul><li>Too Many Dimensions </li></ul><ul><li>Parallel ETL </li></ul>
  26. 27. Conformed Dimensions <ul><li>Reduces the learning curve </li></ul><ul><li>Allows models to be combined </li></ul><ul><li>Account number padding, e.g. </li></ul>
  27. 28. Some things to keep in mind <ul><li>Terminology is confusing and inconsistent – only your architecture matters – keep eyes open to approaches, but terminology is not as important as conventions chosen matching environment desired. </li></ul><ul><li>Overriding concern is practicality – get the information into users hands, this will drive the need for more information and guide you into managing the data. </li></ul><ul><li>Decoupling produces a lot of redundancy: Source->Flat File->EDI gateway->Stage->DW – understand where the redundancy can be removed, and where decoupling is the goal. </li></ul>
  28. 29. NULLs <ul><li>Usually represent unknowns </li></ul><ul><li>Big problem for users in face of model evolution </li></ul><ul><li>If you have a derived stat/measure like customer.allfees = customer.latefees + customer.nsffees </li></ul><ul><li>Model starts out like </li></ul><ul><li>-latefees money NOT NULL </li></ul><ul><li>-nsffees money NOT NULL </li></ul><ul><li>Now we branch out into mailbox rental: </li></ul><ul><li>-customer.rentalfees NULL (or NOT NULL?) </li></ul><ul><li>customer.allfees = customer.latefees + customer.nsffees + customer.rentalfees </li></ul><ul><li>Handle with a view, or populate old data with 0 </li></ul>
  29. 30. Performance Issues <ul><li>Cleansing/Manipulation: </li></ul><ul><li>Y/N, M/F, Codes – standardize in the ETL, use data types efficiently </li></ul><ul><li>Indexes – keep end goals in mind, index according to expected usage </li></ul><ul><li>SARG'able, leading zeros/spaces – look for consistency where posible to avoid data manipulation prior to joins, this helps index usage </li></ul><ul><li>Partitioning tables – for sliding windows of data retention, partitioning the tables allows old data to be dropped off the end of the fact tables fairly easily </li></ul>
  30. 31. Application Logic <ul><li>Shared work should be pushed into ETL when: </li></ul><ul><li>Not likely to change </li></ul><ul><li>Expensive </li></ul><ul><li>Everybody needs it </li></ul><ul><li>Examples: </li></ul><ul><li>Trivial - Scaling to convention (rates) </li></ul><ul><li>Intermediate - Simple calculations (Patient Age) </li></ul><ul><li>Marginal - Interest rates, risk ratings </li></ul><ul><li>Alternative to marginal cases - generate additional facts, either in their own fact tables or as late arriving facts </li></ul><ul><li>When a DW is shared, lots more applications to worry about </li></ul>

×