02 data werehouse

38
สสสสสส ดด.ดดดดดดดดด ดดดดดดดดดด ดดดดด ดดดดดดดดดดดดดดดด ดดดดดดดดดดดดดดดดดดด Chapter 2 : Data warehouse 1 1 กกกกกกกกกกกกกกกกกก (Data M

Transcript of 02 data werehouse

  • 1. . Chapter 2 : Data warehouse 1 336331 (Data Ming)

2. (Data warehouse) Data Warehouse Star Schema Snowflake Schema Schema OLAP Cubes OLAP DBMS, OLAP, and Data Mining 2 3. (Data warehouse) 3 4. 4 5. 5 6. (Data Warehousing) Data Warehousing Data Warehouse Data Source 1 Data Source 2 Data Source 3 Data Resources Data Staging Data Store Data Provisioning Data Mart Staging Database Data Data Cleaning and Filtering 6 7. (Data Warehousing) (Data Resources) Data source (Data Staging) (Cleansing) (Filtering) 7 8. (Data Warehousing) (Data Store) Cleansing Filtering Data Warehouse Data warehouse Database (Data Provisioning) Data Mart 8 9. 1. Subject-Oriented 9 10. () 10 11. () 2. Integrated 11 12. () 3. Time-Variant 5-10 4. Non-Volatile 12 13. Data Warehouse Fact table data warehouse data mart measures Fact row fact Measure , column fact table measure Dimension Dimension table data warehouse data mart fact table 13 14. Star Schema star schema fact table dimension table fact normalized center 14 15. Star Schema Store Key Product Key Period Key Units Price Store Dimension Time Dimension Product Dimension Fact Table Store Key Store Name City State Region Period Key Year Quarter Month Product Key Product Desc 15 16. Star Schema Store Dimension Time Dimension Product Dimension Fact Table Store Key Store Name City State Region Period Key Year Quarter Month Product Key Product Desc Dimension tables Dimension Store Key Product Key Period Key Units Price Fact 16 17. Snowflake Schema Store Key Product Key Period Key Units Price Time Dimension Product Dimension Fact Table Store Key Store Name City Key Period Key Year Quarter Month Product Key Product Desc City Key City State Region City Dimension Store Dimension Snowflake schema Star schema dimension table normal form 17 18. Schema 2 Data Warehouse Star Schema dimension table dimension key index central fact table Snowflake Schema 18 19. OLAP Cubes OLAP Online analytical processing (Multidimensional) OLAP Cube Data Warehouse Time Product 19 20. OLAP 1. Roll up / Consolidation 2. Drill Down 3. Slice 4. Dice 20 21. OLAP (Bread) (Cookies) (West), (Northwest) Mumbai, Pune, Ahmadabad, Baroda ?? 21 22. Sale Data warehouse Model City_ID Prod_ID Month Units Rupees 1 589 1/1/1998 3 7.95 1 1218 1/1/1998 4 7.32 2 589 1/1/1998 3 7.95 2 1218 1/1/1998 4 7.32 1 580 2/1/1998 16 42.40 Product Tables Prod_ID Product_Name Product_Category_ID 589 Wheat Bread 1 590 White Bread 1 288 Coconut Cookies 2 1218 Cheese 1 580 Swiss Rolls 1 Product_Category_ID Product_Category 1 Bread 2 Cookies City_ID City Region Country 1 Mumbai West India 2 Pune NorthWest India City Table Sale Table Product_Category 22 23. Sale Data warehouse Model City_ID Prod_ID Month Units Rupees 1 589 1/1/1998 3 7.95 1 1218 1/1/1998 4 7.32 2 589 1/1/1998 3 7.95 2 1218 1/1/1998 4 7.32 1 580 2/1/1998 16 42.40 Product Tables (Dimension Table) Product_Category_ID Product_Category 1 Bread 2 Cookies City_ID City Region Country 1 Mumbai West India 2 Pune NorthWest India City Table (Dimension Table) Sale Table (Fact Table) Prod_ID Product_Name Product_Category_ID 589 Wheat Bread 1 590 White Bread 1 288 Coconut Cookies 2 1218 Cheese 1 580 Swiss Rolls 1 Product_Category 23 24. Sales Fact Table (Dimensions) (Region) (city), (Product), (Time) (Measure) (Units), (Price) 24 25. Sale Data warehouse Model City Product Month Units Rupees Mumbai Wheat Bread January 3 7.95 Mumbai Cheese January 4 7.32 Pune Wheat Bread January 3 7.95 Pune Cheese January 4 7.32 Mumbai Swiss Rolls February 16 42.40 City_ID Prod_ID Month Units Rupees 1 589 1/1/1998 3 7.95 1 1218 1/1/1998 4 7.32 2 589 1/1/1998 3 7.95 2 1218 1/1/1998 4 7.32 1 580 2/1/1998 16 42.40 25 26. OLAP City Product Month Units Rupees Mumbai Wheat Bread January 3 7.95 Mumbai Cheese January 4 7.32 Pune Wheat Bread January 3 7.95 Pune Cheese January 4 7.32 Mumbai Wheat Bread February 16 42.40 26 27. Sales Information Report: 113 Report: January February March April 14 41 33 25 27 28. Sales Information Report : Jan Feb Mar Apr Wheat Bread 6 0 6 17 Cheese 8 16 6 8 Swiss Rolls 0 25 21 0 Time 2 28 29. Sales Information Report: Jan Feb Mar Apr Mumbai Wheat Bread 3 0 3 10 Cheese 4 16 6 0 Swiss Rolls 0 16 6 0 Pune Wheat Bread 3 0 3 7 Cheese 4 0 0 8 Swiss Rolls 0 9 15 0 Time Product 3 29 30. Sales Information Report: Jan Feb Mar Apr Rs U Rs U Rs U Rs U Mumbai Wheat Bread 0 0 0 0 7.44 3 24.80 10 Cheese 7.95 3 42.40 16 15.90 6 0 0 Swiss Rolls 7.32 4 29.98 16 10.98 6 0 0 Pune Wheat Bread 0 0 0 0 7.44 3 17.36 7 Cheese 7.95 3 0 0 0 0 21.20 8 Swiss Rolls 7.32 4 16.47 9 27.45 15 0 0 30 31. Drill down & Roll up Roll Up Drill Down January February March April 14 41 33 25 Jan Feb Mar Apr Wheat Bread 6 6 17 Cheese 8 16 6 8 Swiss Rolls 25 21 Jan Feb Mar Apr Mumbai Wheat Bread 3 3 10 Cheese 4 16 6 Swiss Rolls 16 6 Pune Wheat Bread 3 3 7 Cheese 4 8 Swiss Rolls 9 15 31 32. Slide Time Product Product= Swiss Rolls Wheat Bread Cheese Swiss Rolls Mumbai Pune Ahemdabad Baroda Jan Feb March Apr Time Jan Feb March Apr 3 10 3 7 1 1 1 2 10 5 3 4 10 5 3 4 3 10 3 7 1 1 1 2 32 33. Slide Time Product Product= Cheese Wheat Bread Cheese Swiss Rolls Mumbai Pune Ahemdabad Baroda Jan Feb March Apr Time Jan Feb March Apr 3 10 3 7 1 1 1 2 10 5 3 4 10 5 3 4 3 16 6 3 8 1 1 1 2 33 34. Slide Time Product Product= Swiss Rolls, Cheese, Wheat Bread Wheat Bread Cheese Swiss Rolls Mumbai Pune Ahemdabad Baroda Jan Feb March Apr Time Jan Feb March 3 10 3 7 1 1 1 2 10 5 3 4 10 5 3 3 3 1 1 1 34 35. Dice Time Product Wheat Bread Cheese Swiss Rolls Mumbai Pune Ahmadabad Baroda Jan Feb March Apr 3 10 3 7 1 1 1 2 10 5 3 4 Time City Cheese Swiss Rolls Jan Feb March Apr Wheat Bread Mumbai Pune Ahmadabad Baroda 35 36. Data Warehouse & Data Mining Customers Etc Vendors Etc Orders Data Warehouse Enterprise Database Transactions Copied, organized summarized Data Mining Data Miners: Farmers they know Explorers - unpredictable 36 37. DBMS, OLAP, and Data Mining DBMS DW (OLAP) Data Mining 3 ? ? 6 ? 37 38. 38