Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. 10-28-2008, Tuesday Data Warehouse <ul><li>Class </li></ul><ul><ul><ul><li>Will </li></ul></ul></ul><ul><ul><ul><ul><ul><li>Start </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Momentarily… </li></ul></ul></ul></ul></ul>CS8630 Database Administration Dr. Mario Guimaraes
  2. 2. Datawarehouse example
  3. 3. Definition <ul><li>Data Warehouse : </li></ul><ul><ul><li>A subject-oriented, integrated, time-variant, non-updatable collection of data used in support of management decision-making processes </li></ul></ul><ul><ul><li>Subject-oriented: e.g. customers, patients, students, products </li></ul></ul><ul><ul><li>Integrated: Consistent naming conventions, formats, encoding structures; from multiple data sources </li></ul></ul><ul><ul><li>Time-variant: Can study trends and changes </li></ul></ul><ul><ul><li>Nonupdatable: Read-only, periodically refreshed </li></ul></ul><ul><li>Data Mart : </li></ul><ul><ul><li>A data warehouse that is limited in scope. Subset of a Data Warehouse </li></ul></ul>
  4. 4. Need for Data Warehousing <ul><li>Integrated, company-wide view of high-quality information (from disparate databases) </li></ul><ul><li>Separation of operational and informational systems and data (for improved performance) </li></ul>
  5. 5. Data Warehouse vs. Data Mart Source : adapted from Strange (1997).
  6. 6. Generic two-level architecture E T L One, company-wide warehouse Periodic extraction  data is not completely current in warehouse
  7. 7. Data Warehouse Architectures <ul><li>Generic Two-Level Architecture </li></ul><ul><li>Independent Data Mart </li></ul><ul><li>Dependent Data Mart and Operational Data Store </li></ul><ul><li>Logical Data Mart and @ctive Warehouse </li></ul><ul><li>Three-Layer architecture </li></ul>All involve some form of extraction , transformation and loading ( ETL )
  8. 8. Independent Data Mart E T L Separate ETL for each independent data mart Data access complexity due to multiple data marts
  9. 9. Dependent data mart with operational data store E T L Single ETL for enterprise data warehouse (EDW) Simpler data access Dependent data marts loaded from EDW
  10. 10. Logical data mart and @ctive data warehouse E T L Near real-time ETL for @active Data Warehouse Data marts are NOT separate databases, but logical views of the data warehouse  Easier to create new data marts
  11. 11. Three-layer architecture
  12. 12. Data Reconciliation <ul><li>Typical operational data is: </li></ul><ul><ul><li>Transient – not historical </li></ul></ul><ul><ul><li>Not normalized (perhaps due to denormalization for performance) </li></ul></ul><ul><ul><li>Restricted in scope – not comprehensive </li></ul></ul><ul><ul><li>Sometimes poor quality – inconsistencies and errors </li></ul></ul><ul><li>After ETL, data should be: </li></ul><ul><ul><li>Detailed – not summarized yet </li></ul></ul><ul><ul><li>Historical – periodic </li></ul></ul><ul><ul><li>Normalized – 3 rd normal form or higher </li></ul></ul><ul><ul><li>Comprehensive – enterprise-wide perspective </li></ul></ul><ul><ul><li>Quality controlled – accurate with full integrity </li></ul></ul>
  13. 13. The ETL Process <ul><li>Capture </li></ul><ul><li>Scrub or data cleansing </li></ul><ul><li>Transform </li></ul><ul><li>Load and Index </li></ul>ETL = Extract, transform, and load
  14. 14. Steps in data reconciliation Static extract = capturing a snapshot of the source data at a point in time Incremental extract = capturing changes that have occurred since the last static extract Capture = extract…obtaining a snapshot of a chosen subset of the source data for loading into the data warehouse
  15. 15. Steps in data reconciliation Scrub = cleanse…uses pattern recognition and AI techniques to upgrade data quality Fixing errors: misspellings, erroneous dates, incorrect field usage, mismatched addresses, missing data, duplicate data, inconsistencies Also: decoding, reformatting, time stamping, conversion, key generation, merging, error detection/logging, locating missing data
  16. 16. Steps in data reconciliation Transform = convert data from format of operational system to format of data warehouse Record-level: Selection – data partitioning Joining – data combining Aggregation – data summarization Field-level: single-field – from one field to one field multi-field – from many fields to one, or one field to many
  17. 17. Steps in data reconciliation Load/Index= place transformed data into the warehouse and create indexes Refresh mode: bulk rewriting of target data at periodic intervals Update mode: only changes in source data are written to data warehouse
  18. 18. Single-field transformation In general – some transformation function translates data from old form to new form Algorithmic transformation uses a formula or logical expression Table lookup – another approach
  19. 19. Multifield transformation M:1 –from many source fields to one target field 1:M –from one source field to many target fields
  20. 20. Derived Data <ul><li>Objectives </li></ul><ul><ul><li>Ease of use for decision support applications </li></ul></ul><ul><ul><li>Fast response to predefined user queries </li></ul></ul><ul><ul><li>Customized data for particular target audiences </li></ul></ul><ul><ul><li>Ad-hoc query support </li></ul></ul><ul><ul><li>Data mining capabilities </li></ul></ul><ul><li> Characteristics </li></ul><ul><ul><li>Detailed (mostly periodic) data </li></ul></ul><ul><ul><li>Aggregate (for summary) </li></ul></ul><ul><ul><li>Distributed (to departmental servers) </li></ul></ul>Most common data model = star schema (also called “dimensional model”)
  21. 21. Components of a star schema Fact tables contain factual or quantitative data Dimension tables contain descriptions about the subjects of the business 1:N relationship between dimension tables and fact tables Excellent for ad-hoc queries, but bad for online transaction processing Dimension tables are denormalized to maximize performance
  22. 22. Star schema example Fact table provides statistics for sales broken down by product, period and store dimensions
  23. 23. Star schema with sample data
  24. 24. Issues Regarding Star Schema <ul><li>Dimension table keys must be surrogate (non-intelligent and non-business related), because: </li></ul><ul><ul><li>Keys may change over time </li></ul></ul><ul><ul><li>Length/format consistency </li></ul></ul><ul><li>Granularity of Fact Table – what level of detail do you want? </li></ul><ul><ul><li>Transactional grain – finest level </li></ul></ul><ul><ul><li>Aggregated grain – more summarized </li></ul></ul><ul><ul><li>Finer grains  better market basket analysis capability </li></ul></ul><ul><ul><li>Finer grain  more dimension tables, more rows in fact table </li></ul></ul>
  25. 25. Modeling dates Fact tables contain time-period data  Date dimensions are important
  26. 26. The User Interface Metadata <ul><li>Identify subjects of the data mart </li></ul><ul><li>Identify dimensions and facts </li></ul><ul><li>Indicate how data is derived from enterprise data warehouses, including derivation rules </li></ul><ul><li>Indicate how data is derived from operational data store, including derivation rules </li></ul><ul><li>Identify available reports and predefined queries </li></ul><ul><li>Identify data analysis techniques (e.g. drill-down) </li></ul><ul><li>Identify responsible people </li></ul>
  27. 27. Data Mining and Visualization <ul><li>Knowledge discovery using a blend of statistical, AI, and computer graphics techniques </li></ul><ul><li>Goals: </li></ul><ul><ul><li>Explain observed events or conditions </li></ul></ul><ul><ul><li>Confirm hypotheses </li></ul></ul><ul><ul><li>Explore data for new or unexpected relationships </li></ul></ul><ul><li>Techniques </li></ul><ul><ul><li>Case-based reasoning </li></ul></ul><ul><ul><li>Rule discovery </li></ul></ul><ul><ul><li>Signal processing </li></ul></ul><ul><ul><li>Neural nets </li></ul></ul><ul><ul><li>Fractals </li></ul></ul><ul><li>Data visualization – representing data in graphical/multimedia formats for analysis </li></ul>
  28. 28. Summary Data warehouse Characteristics <ul><li>At one time, a huge amount of information may be queried as opposed to conventional DBMS that a typical query involves few records. </li></ul><ul><li>Data changes much more than operational data (in terms of new datatypes, new tables, etc.). DDL changes a lot. </li></ul><ul><li>Don’t work with real-time data but snapshots. </li></ul><ul><li>Historical data – Time is important </li></ul><ul><li>Frequently work with Terabytes of Data </li></ul><ul><li>Require different types of indexes and/or search engines. For example, bit-map indexing, or full table scan with partitioning. </li></ul><ul><li>Materialized Views are an important part. </li></ul><ul><li>Roll-up/Drill-down: Data is summarized with increasing generalization (weekly, quarterly, annually). </li></ul><ul><li>Fact Table x Dimension Table (Derived Table, Views, etc.) </li></ul><ul><li>Star Schema x Snow flake schema </li></ul><ul><li>  </li></ul>
  29. 29. Typical Data Warehouse functions <ul><li>Extract and Load </li></ul><ul><li>Clean and Transform </li></ul><ul><li>Backup and Arquive </li></ul><ul><li>Query Management </li></ul>
  30. 30. GUIDELINES <ul><li>1)      Start extracting data from data sources when it represents the same snapshot time as all other data sources. </li></ul><ul><li>2)      Do not execute consistency checks until all the data sources have been loaded into the temporary data store. </li></ul><ul><li>3)      Expect the effort required to clean up the source systems to increase exponentially with the number of overlapping data sources. </li></ul><ul><li>4)      Always assume that the amount of effort required to clean up data sources is substantially greater than you would expect. </li></ul><ul><li>5)      Consider dropping index prior to loading and recreate index afterwards. </li></ul><ul><li>6)      Determine what business activities require detailed transaction information. </li></ul><ul><li>7)      Read only in separate tablespaces from r/w. </li></ul><ul><li>8)      Separate your FACT data from your DIMENSION data. </li></ul><ul><li>9)      Consider Partitioning Data. If DBMS doesn’t support this, use each partition as a separate table and using a view that it is a union of all the tables. </li></ul><ul><li>  </li></ul>
  31. 31. Generic Tools for Datawarehouse <ul><li>Bitmap Index </li></ul><ul><li>Materialized Views and Snapshots </li></ul><ul><li>Partitioning Tables </li></ul><ul><li>3 rd party tools for optimizing SQL statements </li></ul><ul><li>Backup Database, Drop tables, Restore Database, re-build indexes. </li></ul>
  32. 32. DW x Data Mining <ul><li>Extraction, Query and Analysis of Data </li></ul><ul><li>Searches for patterns. </li></ul><ul><li>Can use neural networks, statistics, etc. </li></ul>
  33. 33. Oracle Specific Tools for DW <ul><li>Datawarehouse Builder is a generic DW tool (for custom DW development) runs on top of Oracle 8i and Oracle 9i. </li></ul><ul><li>OFA (Oracle Financial Analyzer) and Oracle Sales Analyzer are specific tool. </li></ul><ul><li>Imports data from Oracle General Ledger to Express </li></ul><ul><li>It runs on top of the Express Database Engine. </li></ul>
  34. 34. Oracle Data Mining Tool <ul><li>Darwin: has its own database engine </li></ul>
  35. 35. End of Lecture <ul><li>End </li></ul><ul><li>Of </li></ul><ul><li>Today’s </li></ul><ul><li>Lecture. </li></ul>