数据仓库的数据模型与数据组织(40P).ppt
《数据仓库的数据模型与数据组织(40P).ppt》由会员分享,可在线阅读,更多相关《数据仓库的数据模型与数据组织(40P).ppt(40页珍藏版)》请在三一办公上搜索。
1、2023年2月3日星期五,Data Mining:Concepts and Techniques,1,第二章数据仓库的数据模型与数据组织,本章要点数据仓库的数据模型概念模型逻辑模型物理模型数据仓库数据组织的基本概念粒度维度元数据数据分割数据仓库的数据组织数据仓库的数据组织方式数据仓库的数据存储组织,2023年2月3日星期五,Data Mining:Concepts and Techniques,2,数据仓库中的数据组织,高度综合级,轻度综合级,当前综合级,早期细节级,多级数据,2023年2月3日星期五,Data Mining:Concepts and Techniques,3,Cube:A L
2、attice of Cuboids,all,time,item,location,supplier,time,item,time,location,time,supplier,item,location,item,supplier,location,supplier,time,item,location,time,item,supplier,time,location,supplier,item,location,supplier,time,item,location,supplier,0-D(apex)cuboid,1-D cuboids,2-D cuboids,3-D cuboids,4-
3、D(base)cuboid,2023年2月3日星期五,Data Mining:Concepts and Techniques,4,数据仓库的数据模型与数据库系统数据模型的区别,数据仓库的数据模型中不包含纯操作型数据。数据仓库的数据模型扩充了码结构,增加了时间属性作为码的一部分。数据仓库的数据模型中增加了一些面向主题的导出数据。,2023年2月3日星期五,Data Mining:Concepts and Techniques,5,星型图模型 物理数据模型,概念模型,逻辑模型,物理模型,面向用户的需求,细 化层次,更详细的技术细节,数据仓库的数据模型,信息包图,2023年2月3日星期五,Data
4、Mining:Concepts and Techniques,6,信息包图(概念模型),信息包图:是数据仓库的数据模型的第一层或最高层。由于大多数商务数据是多维的,但传统的数据模型表示三维以上的数据有一定困难。而信息包图简化了这一过程并且允许用户设计多维信息包并与开发者和其他用户建立联系。这种模型集中在用户对信息包的需要,信息包提供了分析人员思维模式的可视化表示。工作:确定系统边界:决策类型、需要的信息、原始信息确定主题域及其内容:主题域的公共键码、联系、属性组确定维度:如时间维、销售位置维、产品维、组别维等确定类别:相应维的详细类别确定指标和事实:用于进行分析的数值化信息,2023年2月3日
5、星期五,Data Mining:Concepts and Techniques,7,信息包图,信息包:维度类别空白信息包图样式,2023年2月3日星期五,Data Mining:Concepts and Techniques,8,信息包图,例试画出销售分析的信息包图。解:首先根据销售分析的实际需求,确定信息包的维度、类别和指标与事实:(1)维度:包括日期维、销售地点维、销售产品维、年龄组别维、性别维等。(2)类别:确定各维的详细类别,如:日期维包括年(10)、季度(40)、月(120)等类别,括号中的数字分别指出各类别的数量;销售地点维包括国家(15)、区域(45)、城市(280)、区(880
6、)、商店(2000)等类别,括号中的数字同样分别指出各类别的数量;类似地,可以确定销售产品、年龄组别维、性别维等的详细类别。(3)指标和事实:确定用于进行分析的数值化信息,包括预测销售量、实际销售量和预测偏差等。,2023年2月3日星期五,Data Mining:Concepts and Techniques,9,销售分析的信息包图,信息包:销售分析维度,类别,2023年2月3日星期五,Data Mining:Concepts and Techniques,10,A Concept Hierarchy:Dimension(location),all,Europe,North_America,M
7、exico,Canada,Spain,Germany,Vancouver,M.Wind,L.Chan,.,.,.,.,.,.,all,region,office,country,Toronto,Frankfurt,city,2023年2月3日星期五,Data Mining:Concepts and Techniques,11,星型图模型(逻辑模型),星型图:数据仓库的数据模型的第二层是向最终的数据结构添加某些细节的星型图模型。与传统的关系模型相比,星型图模型简化了用户分析所需的关系,从支持决策的角度去定义数据实体,更适合大量复杂查询。星形图包括了三种逻辑实体:指标维度详细类别,2023年2月3
8、日星期五,Data Mining:Concepts and Techniques,12,星型图模型(逻辑模型)例销售分析的星型图模型。,时间维,产品维,地区维,组别维,其他维,销售分析:实际销售 预测销售 预测偏差,2023年2月3日星期五,Data Mining:Concepts and Techniques,13,Example of Star Schema,Sales Fact Table,time_key,item_key,branch_key,location_key,units_sold,dollars_sold,avg_sales,Measures,2023年2月3日星期五,Da
9、ta Mining:Concepts and Techniques,14,Defining a Star Schema in DMQL,define cube sales_star 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(ite
10、m_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),2023年2月3日星期五,Data Mining:Concepts and Techniques,15,Example of Snowflake Schema,Sales Fact Table,time_key,item_key,b
11、ranch_key,location_key,units_sold,dollars_sold,avg_sales,Measures,2023年2月3日星期五,Data Mining:Concepts and Techniques,16,Defining a Snowflake Schema in 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
12、 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,cou
13、ntry),2023年2月3日星期五,Data Mining:Concepts and Techniques,17,Example of Fact Constellation,Sales Fact Table,time_key,item_key,branch_key,location_key,units_sold,dollars_sold,avg_sales,Measures,Shipping Fact Table,time_key,item_key,shipper_key,from_location,to_location,dollars_cost,units_shipped,2023年2月
14、3日星期五,Data Mining:Concepts and Techniques,18,Defining a Fact Constellation in 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 i
15、tem 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_ship
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 数据仓库 数据模型 数据 组织 40
![提示](https://www.31ppt.com/images/bang_tan.gif)
链接地址:https://www.31ppt.com/p-2228708.html