Date post: | 26-Mar-2015 |
Category: |
Documents |
Upload: | anna-maloney |
View: | 219 times |
Download: | 0 times |
© 2005 by Prentice Hall© 2005 by Prentice Hall 11
Chapter 11:Chapter 11: Data Warehousing Data Warehousing
Modern Database Modern Database ManagementManagement
77thth Edition EditionJeffrey A. Hoffer, Mary B. Prescott, Jeffrey A. Hoffer, Mary B. Prescott,
Fred R. McFaddenFred R. McFadden
22Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
ObjectivesObjectives Definition of termsDefinition of terms Reasons for information gap between Reasons for information gap between
information needs and availabilityinformation needs and availability Reasons for need of data warehousingReasons for need of data warehousing Describe three levels of data warehouse Describe three levels of data warehouse
architecturesarchitectures List four steps of data reconciliationList four steps of data reconciliation Describe two components of star schemaDescribe two components of star schema Estimate fact table sizeEstimate fact table size Design a data martDesign a data mart
33Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
DefinitionDefinition Data WarehouseData Warehouse: :
A subject-oriented, integrated, time-variant, non-A subject-oriented, integrated, time-variant, non-updatable collection of data used in support of updatable collection of data used in support of management decision-making processesmanagement decision-making processes
Subject-oriented:Subject-oriented: e.g. customers, patients, e.g. customers, patients, students, productsstudents, products
Integrated: Integrated: Consistent naming conventions, Consistent naming conventions, formats, encoding structures; from multiple data formats, encoding structures; from multiple data sourcessources
Time-variant: Time-variant: Can study trends and changesCan study trends and changes Nonupdatable: Nonupdatable: Read-only, periodically refreshedRead-only, periodically refreshed
Data MartData Mart:: A data warehouse that is limited in scopeA data warehouse that is limited in scope
44Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Need for Data WarehousingNeed for Data Warehousing Integrated, company-wide view of high-quality Integrated, company-wide view of high-quality
information (from disparate databases)information (from disparate databases) Separation of Separation of operationaloperational and and informationalinformational
systems and data (for improved performance)systems and data (for improved performance)
55Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Source: adapted from Strange (1997).
66Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Data Warehouse Data Warehouse ArchitecturesArchitectures
Generic Two-Level ArchitectureGeneric Two-Level Architecture Independent Data MartIndependent Data Mart Dependent Data Mart and Dependent Data Mart and
Operational Data StoreOperational Data Store Logical Data Mart and @ctive Logical Data Mart and @ctive
WarehouseWarehouse Three-Layer architectureThree-Layer architecture
All involve some form of extraction, transformation and loading (ETLETL)
77Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Figure 11-2: Generic two-level architecture
E
T
LOne, company-wide warehouse
Periodic extraction data is not completely current in warehouse
88Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Figure 11-3: Independent data martData marts:Data marts:Mini-warehouses, limited in scope
E
T
L
Separate ETL for each independent data mart
Data access complexity due to multiple data marts
99Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Figure 11-4: Dependent data mart with operational data store
ET
L
Single ETL for enterprise data warehouse(EDW)(EDW)
Simpler data access
ODS ODS provides option for obtaining current data
Dependent data marts loaded from EDW
1010Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
ET
L
Near real-time ETL for @active Data Warehouse@active Data Warehouse
ODS ODS and data warehousedata warehouse are one and the same
Data marts are NOT separate databases, but logical views of the data warehouse Easier to create new data marts
1111Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Figure 11-6: Three-layer data architecture
1212Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Data CharacteristicsData CharacteristicsStatus vs. Event DataStatus vs. Event Data
Status
Status
Event = a database action (create/update/delete) that results from a transaction
1313Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Data CharacteristicsData CharacteristicsTransient vs. Periodic DataTransient vs. Periodic Data
Changes to existing records are written over previous records, thus destroying the previous data content
Data are never physically altered or
deleted once they have been added to
the store
1414Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Data ReconciliationData Reconciliation Typical operational data is:Typical operational data is:
Transient – not historicalTransient – not historical Not normalized (perhaps due to denormalization for Not normalized (perhaps due to denormalization for
performance)performance) Restricted in scope – not comprehensiveRestricted in scope – not comprehensive Sometimes poor quality – inconsistencies and errorsSometimes poor quality – inconsistencies and errors
After ETL, data should be:After ETL, data should be: Detailed – not summarized yetDetailed – not summarized yet Historical – periodicHistorical – periodic Normalized – 3Normalized – 3rdrd normal form or higher normal form or higher Comprehensive – enterprise-wide perspectiveComprehensive – enterprise-wide perspective Timely – data should be current enough to assist decision-Timely – data should be current enough to assist decision-
makingmaking Quality controlled – accurate with full integrityQuality controlled – accurate with full integrity
1515Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
The ETL ProcessThe ETL Process
Capture/ExtractCapture/Extract Scrub or data cleansingScrub or data cleansing TransformTransform Load and IndexLoad and Index
ETL = Extract, transform, and load
1616Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Static extractStatic extract = capturing a snapshot of the source data at a point in time
Incremental extractIncremental 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
1717Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Scrub/Cleanse…uses pattern recognition and AI techniques to upgrade data quality
Fixing errors:Fixing errors: misspellings, erroneous dates, incorrect field usage, mismatched addresses, missing data, duplicate data, inconsistencies
Also:Also: decoding, reformatting, time stamping, conversion, key generation, merging, error detection/logging, locating missing data
1818Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Transform = convert data from format of operational system to format of data warehouse
Record-level:Record-level:Selection – data partitioningJoining – data combiningAggregation – data summarization
Field-level:Field-level: single-field – from one field to one fieldmulti-field – from many fields to one, or one field to many
1919Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Load/Index= place transformed data into the warehouse and create indexes
Refresh mode:Refresh mode: bulk rewriting of target data at periodic intervals
Update mode:Update mode: only changes in source data are written to data warehouse
2020Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Figure 11-11: 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, uses a separate table keyed by source record code
2121Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Figure 11-12: Multifield transformation
M:1 – from many source fields to one target field
1:M – from one source field to many target fields
2222Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Derived DataDerived Data ObjectivesObjectives
Ease of use for decision support applicationsEase of use for decision support applications Fast response to predefined user queriesFast response to predefined user queries Customized data for particular target audiencesCustomized data for particular target audiences Ad-hoc query supportAd-hoc query support Data mining capabilitiesData mining capabilities
CharacteristicsCharacteristics Detailed (mostly periodic) dataDetailed (mostly periodic) data Aggregate (for summary)Aggregate (for summary) Distributed (to departmental servers)Distributed (to departmental servers)
Most common data model = star schemastar schema(also called “dimensional model”)
2323Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Figure 11-13: Components of a star schemastar 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
2424Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Figure 11-14: Star schema example
Fact table provides statistics for sales broken down by product, period and store dimensions
2525Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
2626Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Issues Regarding Star Issues Regarding Star SchemaSchema
Dimension table keys must be Dimension table keys must be surrogatesurrogate (non- (non-intelligent and non-business related), because:intelligent and non-business related), because: Keys may change over timeKeys may change over time Length/format consistencyLength/format consistency
Granularity of Fact Table – what level of detail do Granularity of Fact Table – what level of detail do you want? you want? Transactional grain – finest levelTransactional grain – finest level Aggregated grain – more summarizedAggregated grain – more summarized Finer grains Finer grains better better market basket analysismarket basket analysis capability capability Finer grain Finer grain more dimension tables, more rows in fact table more dimension tables, more rows in fact table
Duration of the database – how much history Duration of the database – how much history should be kept?should be kept? Natural duration – 13 months or 5 quartersNatural duration – 13 months or 5 quarters Financial institutions may need longer durationFinancial institutions may need longer duration Older data is more difficult to source and cleanseOlder data is more difficult to source and cleanse
2727Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Figure 11-16: Modeling dates
Fact tables contain time-period data Date dimensions are important
2828Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Helper table simplifies representation of hierarchies in data warehouses
2929Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
The User InterfaceThe User InterfaceMetadata (data catalog)Metadata (data catalog)
Identify subjects of the data martIdentify subjects of the data mart Identify dimensions and factsIdentify dimensions and facts Indicate how data is derived from enterprise Indicate how data is derived from enterprise
data warehouses, including derivation rulesdata warehouses, including derivation rules Indicate how data is derived from operational Indicate how data is derived from operational
data store, including derivation rulesdata store, including derivation rules Identify available reports and predefined queriesIdentify available reports and predefined queries Identify data analysis techniques (e.g. drill-down)Identify data analysis techniques (e.g. drill-down) Identify responsible peopleIdentify responsible people
3030Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
On-Line Analytical Processing On-Line Analytical Processing (OLAP)(OLAP)
The use of a set of graphical tools that provides The use of a set of graphical tools that provides users with multidimensional views of their data users with multidimensional views of their data and allows them to analyze the data using and allows them to analyze the data using simple windowing techniquessimple windowing techniques
Relational OLAP (ROLAP)Relational OLAP (ROLAP) Traditional relational representationTraditional relational representation
Multidimensional OLAP (MOLAP)Multidimensional OLAP (MOLAP) CubeCube structure structure
OLAP OperationsOLAP Operations Cube slicingCube slicing – come up with 2-D view of data – come up with 2-D view of data Drill-downDrill-down – going from summary to more detailed – going from summary to more detailed
viewsviews
3131Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Figure 11-22: Slicing a data cube
3232Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Figure 11-23: Example of drill-down
Summary report
Drill-down with color added
Starting with summary data, users can obtain details for particular cells
3333Chapter 11 © 2005 by Prentice Hall© 2005 by Prentice Hall
Data Mining and Data Mining and VisualizationVisualization
Knowledge discovery using a blend of statistical, AI, and computer Knowledge discovery using a blend of statistical, AI, and computer graphics techniquesgraphics techniques
Goals:Goals: Explain observed events or conditionsExplain observed events or conditions Confirm hypothesesConfirm hypotheses Explore data for new or unexpected relationshipsExplore data for new or unexpected relationships
TechniquesTechniques Statistical regressionStatistical regression Decision tree inductionDecision tree induction Clustering and signal processingClustering and signal processing AffinityAffinity Sequence associationSequence association Case-based reasoningCase-based reasoning Rule discoveryRule discovery Neural netsNeural nets FractalsFractals
Data visualization – representing data in graphical/multimedia Data visualization – representing data in graphical/multimedia formats for analysisformats for analysis