Bài giảng Kho dữ liệu và khai phá dữ liệu: Chương 4 - Nguyễn Hoàng Ân (2018)

30 34 0
Bài giảng Kho dữ liệu và khai phá dữ liệu: Chương 4 - Nguyễn Hoàng Ân (2018)

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Bài giảng Khai phá dữ liệu - Chương 4: Phân tích trực tuyến OLAP cung cấp cho người học các kiến thức: Mô hình dữ liệu đa chiều, MOLAP, ROLAP, HOLAP, thiết kế và xây dựng Cube, các thao tác trên hệ thống OLAP. Mời các bạn cùng tham khảo.

Kho liệu khai phá liệu Chương 4: Phân tích trực tuyến OLAP Nguyễn Hồng Ân Nội dung Mơ hình liệu đa chiều MOLAP, ROLAP, HOLAP Thiết kế xây dựng Cube Các thao tác hệ thống OLAP Nguyễn Hồng Ân Mơ hình kho liệu 4.1 Từ bảng liệu đến khối liệu 4.2 Mơ hình luận lý KDL 4.3 Ngôn ngữ truy vấn khai phá liệu (DMQL) Nguyễn Hoàng Ân 4.1 Từ bảng liệu đến khối liệu KDL dựa mơ hình liệu đa chiều nhìn liệu hình thức khối liệu Một khối liệu bán hàng, cho phép liệu mơ hình nhìn nhiều chiều  Các bảng chiều (Dimension Tables) item (item_name, brand, type), time(day, week, month, quarter, year)  Bảng kiện (Fact Table) chứa độ đo (Measure) (như dollars_sold) khóa có liên kết đến bảng chiều Một khối liệu dựa n-D gọi cuboid sở Nguyễn Hoàng Ân Cube: Một lưới Cuboids all time time,item item time,location 0-D(apex) cuboid location item,location time,supplier time,item,location supplier 1-D cuboids location,supplier 2-D cuboids item,supplier time,location,supplier 3-D cuboids time,item,supplier item,location,supplier 4-D(base) cuboid time, item, location, supplier Nguyễn Hồng Ân 4.2 Mơ hình ý niệm KDL Mơ hình kho liệu:  Lược đồ hình (Star schema): Một bảng kiện kết nối đến tập bảng chiều  Lược đồ hình bơng tuyết (Snowflake schema): Tinh chế lược đồ hình sao, vài chiều có phân cấp chuẩn hóa thành tập bảng chiều nhỏ hơn, có hình ảnh giống bơng tuyết  Chịm kiện (Fact constellations): Nhiều bảng kiện chia sẻ bảng chiều Còn gọi lược đồ thiên hà (galaxy schema) Nguyễn Hoàng Ân Ví dụ lược đồ hình time time_key  day day_of_the_week month quarter year item Sales Fact Table time_key item_key branch_key branch branch_key branch_name branch_type location_key units_sold dollars_sold avg_sales item_key item_name brand type supplier_type location location_key street city province_or_street country Measures Nguyễn Hồng Ân Ví dụ lược đồ hình bơng tuyết time time_key day day_of_the_week month quarter year item Sales Fact Table time_key item_key branch_key branch branch_key branch_name branch_type location_key units_sold supplier item_key item_name brand type supplier_key supplier_key supplier_type location location_key street city_key dollars_sold city avg_sales city_key city province_or_street country Measures Nguyễn Hoàng Ân Ví dụ chịm kiện time time_key day day_of_the_week month quarter year item Sales Fact Table time_key item_key item_name brand type supplier_type item_key location_key branch_key branch_name branch_type time_key item_key shipper_key from_location branch_key branch Shipping Fact Table units_sold dollars_sold avg_sales location location_key street city province_or_street country Measures Nguyễn Hoàng Ân to_location dollars_cost units_shipped shipper shipper_key shipper_name location_key 10 shipper_type Nguyễn Hồng Ân 11 Định nghĩa lược đồ bơng tuyết DMQL define cube sales_snowflake [time, item, branch, location]: dollars_sold = sum(sales_in_dollars), avg_sales = avg(sales_in_dollars), units_sold = count(*) define dimension time as (time_key, day, day_of_week, month, quarter, year) define dimension item as (item_key, item_name, brand, type, supplier(supplier_key, supplier_type)) define dimension branch as (branch_key, branch_name, branch_type) define dimension location as (location_key, street, city(city_key, province_or_state, country)) Nguyễn Hoàng Ân 17 Định nghĩa lược đồ chòm kiện DMQL define cube sales [time, item, branch, location]: dollars_sold = sum(sales_in_dollars), avg_sales = avg(sales_in_dollars), units_sold = count(*) define dimension time as (time_key, day, day_of_week, month, quarter, year) define dimension item as (item_key, item_name, brand, type, supplier_type) define dimension branch as (branch_key, branch_name, branch_type) define dimension location as (location_key, street, city, province_or_state, country) define cube shipping [time, item, shipper, from_location, to_location]: dollar_cost = sum(cost_in_dollars), unit_shipped = count(*) define dimension time as time in cube sales define dimension item as item in cube sales define dimension shipper as (shipper_key, shipper_name, location as location in cube sales, shipper_type) define dimension from_location as location in cube sales define dimension to_location as location in cube sales Nguyễn Hoàng Ân 18 define cube sales [time, item, branch, location]: dollars_sold = sum(sales_in_dollars), avg_sales = avg(sales_in_dollars), units_sold = count(*) Nguyễn Hoàng Ân 19 Các loại giá trị đo Phân phối (distributive):  Ví dụ: count(), sum(), min(), max() Đại số (algebraic):  Ví dụ: avg(), min_N(), standard_deviation() Tổng thể (holistic):  Ví dụ: median(), mode(), rank() Nguyễn Hồng Ân 20 Sự phân cấp mức ý niệm: Chiều (location) all all Europe region country city Germany Frankfurt office Data Warehouse and Business Intelligence Spain North_America Canada Vancouver L Chan Mexico Toronto M Wind 21 Dữ liệu đa chiều Sales volume as a function of product, month, Dimensions: Product, Location, Tim and region Hierarchical summarization paths Defined by concept hierarchies Industry Region Year Product Category Country Quarter Product City Office Month Week Day Month Nguyễn Hoàng Ân 22 Dẫn xuất Nguyễn Hoàng Ân 23 Một khối liệu mẫu TV PC VCR sum 1Qtr 2Qtr 3Qtr 4Qtr sum Total annual sales of TV in U.S.A U.S.A Canada Mexico sum Country Date Các Cuboids tương ứng đến Cube all 0-D(apex) cuboid product product,date country date product,country 1-D cuboids date, country 2-D cuboids 3-D(base) cuboid product, date, country Nguyễn Hoàng Ân 25 Các tác vụ OLAP điển hình Roll up (drill-up) Drill down (roll down) Slice dice Pivot (rotate) Các tác vụ khác:  drill across  drill through Nguyễn Hoàng Ân 26 Data Warehouse and Business Intelligence 27 Slicing Nguyễn Hoàng Ân 28 Drill-down Nguyễn Hồng Ân 29 visualization Nguyễn Hồng Ân 30 Mơ hình truy vấn mạng hình (Star-Net) Customer Orders Shipping Method Customer CONTRACTS AIR-EXPRESS ORDER TRUCK PRODUCT LINE Time Product ANNUALY QTRLY DAILY PRODUCT ITEM PRODUCT GROUP CITY SALES PERSON COUNTRY DISTRICT REGION Location Each circle is called a footprint DIVISION Promotion Data Warehouse and Business Intelligence Organization 31 ... Ngôn ngữ truy vấn khai phá liệu (DMQL) Nguyễn Hoàng Ân 4. 1 Từ bảng liệu đến khối liệu KDL dựa mơ hình liệu đa chiều nhìn liệu hình thức khối liệu Một khối liệu bán hàng, cho phép liệu mơ hình nhìn... for sales broken down by product, period and store dimensions Nguyễn Hoàng Ân 13 Nguyễn Hồng Ân 14 4.3 Ngơn ngữ truy vấn khai phá liệu: DMQL Data Mining Query Language: DMQL Định nghĩa khối... Mơ hình liệu đa chiều MOLAP, ROLAP, HOLAP Thiết kế xây dựng Cube Các thao tác hệ thống OLAP Nguyễn Hồng Ân Mơ hình kho liệu 4. 1 Từ bảng liệu đến khối liệu 4. 2 Mơ hình luận lý KDL 4. 3 Ngôn

Ngày đăng: 04/11/2020, 07:03

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan