Download presentation
Presentation is loading. Please wait.
1
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Data Warehouse: additional slides Source: Michael V. Mannino, Database: Design, Application Development & Administration, Third Edition, McGraw Hill, 2007
2
16-2 Data Comparison
3
16-3 Applications
4
16-4 Example: Star Schema
5
16-5 Example: Input table records Sales Table SalesNoSalesDollorTimeNoStoreId 1100001011001 2120001021002 3110001031003 490001011004 5110001021005 6150001031006 TimeDim Table TimeNoTimeMonthTimeYear 10112005 10222005 10332005 10442006 Store Table StoreIdStoreStateStoreNationStoreZip 1001MNUSA80111 1002MNUSA80111 1003MNUSA80111 1004OHUSA80112 1005OHUSA80112 1006OHUSA80112
6
16-6 CUBE Operator Example SELECT StoreZip, TimeMonth, SUM(SalesDollar) AS SumSales FROM Sales, Store, TimeDim WHERE Sales.StoreId = Store.StoreId AND Sales.TimeNo = TimeDim.TimeNo AND (StoreNation = 'USA' OR StoreNation = 'Canada') AND TimeYear = 2005 GROUP BY CUBE (StoreZip, TimeMonth)
7
16-7 CUBE Operator Example Output of query with CUBE operator StoreZipTimeMonthSumSales 80111110000 80111212000 80111311000 8011219000 80112211000 80112315000 80111 33000 80112 35000 119000 223000 326000 68000
8
16-8 ROLLUP Operator Example SELECT StoreZip, TimeMonth, SUM(SalesDollar) AS SumSales FROM Sales, Store, TimeDim WHERE Sales.StoreId = Store.StoreId AND Sales.TimeNo = TimeDim.TimeNo AND (StoreNation = 'USA' OR StoreNation = 'Canada') AND TimeYear = 2005 GROUP BY ROLLUP (StoreZip, TimeMonth);
9
16-9 ROLLUP Operator Example Output of query with ROLLUP operator StoreZipTimeMonthSumSales 80111110000 80111212000 80111311000 8011219000 80112211000 80112315000 80111 33000 80112 35000 68000
10
16-10 GROUPING SETS Example SELECT StoreZip, TimeMonth, SUM(SalesDollar) AS SumSales FROM Sales, Store, Time WHERE Sales.StoreId = Store.StoreId AND Sales.TimeNo = Time.TimeNo AND (StoreNation = 'USA' OR StoreNation = 'Canada') AND TimeYear = 2005 GROUP BY GROUPING SETS((StoreZip, TimeMonth), StoreZip, TimeMonth, ());
11
16-11 GROUPING SETS Example Output of query with ROLLUP operator StoreZipTimeMonthSumSales 80111110000 80111212000 80111311000 8011219000 80112211000 80112315000 80111 33000 80112 35000 119000 223000 326000 68000
12
16-12 ROLAP Techniques Bitmap join indexes Star join optimization Query rewriting Summary storage advisors Parallel query execution
13
16-13 Maintenance Workflow
14
16-14 Data Quality Problems Multiple identifiers Multiple field names Different units Missing values Orphaned values Multipurpose fields Conflicting data Different update times
15
16-15 ETL Tools Extraction, Transformation, and Loading Specification based Eliminate custom coding Third party and DBMS based tools
16
16-16 Refresh Processing
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.