




已阅读5页,还剩35页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
*data mining: concepts and techniques1 第二章 数据仓库的数据模型与数据组织 本章要点 n数据仓库的数据模型 n概念模型 n逻辑模型 n物理模型 n数据仓库数据组织的基本概念 n粒度 n维度 n元数据 n数据分割 n数据仓库的数据组织 n数据仓库的数据组织方式 n数据仓库的数据存储组织 *data mining: concepts and techniques2 数据仓库中的数据组织 高度综合级 轻度综合级 当前综合级 早期细节级 多级数据 *data mining: concepts and techniques3 cube: a lattice of cuboids all timeitemlocationsupplier time,itemtime,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-d(base) cuboid *data mining: concepts and techniques4 数据仓库的数据模型 与数据库系统数据模型的区别 n数据仓库的数据模型中不包含纯操作型数据。 n数据仓库的数据模型扩充了码结构,增加了时间 属性作为码的一部分。 n数据仓库的数据模型中增加了一些面向主题的导 出数据。 *data mining: concepts and techniques5 星型图模型 物理数据模 型 概念模型 逻辑模型 物理模型 面向用户的需求 细 化 层 次 更详细的 技术细节 数据仓库的数据模型 信息包图 *data mining: concepts and techniques6 信息包图(概念模型) n信息包图:是数据仓库的数据模型的第一层或最高层。由于大 多数商务数据是多维的,但传统的数据模型表示三维以上的数 据有一定困难。而信息包图简化了这一过程并且允许用户设计 多维信息包并与开发者和其他用户建立联系。这种模型集中在 用户对信息包的需要,信息包提供了分析人员思维模式的可视 化表示。 n工作: n确定系统边界:决策类型、需要的信息、原始信息 n确定主题域及其内容:主题域的公共键码、联系、属性组 n确定维度:如时间维、销售位置维、产品维、组别维等 n确定类别:相应维的详细类别 n确定指标和事实:用于进行分析的数值化信息 *data mining: concepts and techniques7 信息包图 信息包: 维度 类别 空白信息包图样式 指标和事实 *data mining: concepts and techniques8 信息包图 例试画出销售分析的信息包图。 解:首先根据销售分析的实际需求,确定信息包的维度、类别 和指标与事实: (1)维度:包括日期维、销售地点维、销售产品维、年龄组 别维、性别维等。 (2)类别:确定各维的详细类别,如:日期维包括年(10) 、季度(40)、月(120)等类别,括号中的数字分别指 出各类别的数量;销售地点维包括国家(15)、区域(45 )、城市(280)、区(880)、商店(2000)等类别, 括号中的数字同样分别指出各类别的数量;类似地,可以确 定销售产品、年龄组别维、性别维等的详细类别。 (3)指标和事实:确定用于进行分析的数值化信息,包括预 测销售量、实际销售量和预测偏差等。 *data mining: concepts and techniques9 销售分析的信息包图 日期销售地点销售产品年龄组别性别 年(10)国家(15)产品类(6)年龄组(8)性别组(2) 季度 (40) 区域(45)产品组(48) 月 (120) 城市(280)产品(240) 区(880) 商店 (2000) 指标和事实: 预测销售量、实际销售量、预测偏差 信息包: 销售分析 维度 类别 *data mining: concepts and techniques10 a concept hierarchy: dimension (location) all europenorth_america mexicocanadaspaingermany vancouver m. windl. chan . . . . all region office country torontofrankfurtcity *data mining: concepts and techniques11 星型图模型(逻辑模型) n星型图:数据仓库的数据模型的第二层是向最终的 数据结构添加某些细节的星型图模型。与传统的关 系模型相比,星型图模型简化了用户分析所需的关 系,从支持决策的角度去定义数据实体,更适合大 量复杂查询。 n星形图包括了三种逻辑实体: n指标 n维度 n详细类别 *data mining: concepts and techniques12 星型图模型(逻辑模型) 例销售分析的星型图模型。 时间维 产品维 地区维 组别维 其他维 销售分析: 实际销售 预测销售 预测偏差 *data mining: concepts and techniques13 example of star schema time_key day day_of_the_week month quarter year time location_key street city province_or_street country location sales fact table time_key item_key branch_key location_key units_sold dollars_sold avg_sales measures item_key item_name brand type supplier_type item branch_key branch_name branch_type branch *data mining: concepts and techniques14 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 (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) *data mining: concepts and techniques15 example of snowflake schema time_key day day_of_the_week month quarter year time location_key street city_key location sales fact table time_key item_key branch_key location_key units_sold dollars_sold avg_sales measures item_key item_name brand type supplier_key item branch_key branch_name branch_type branch supplier_key supplier_type supplier city_key city province_or_street country city *data mining: concepts and techniques16 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 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) *data mining: concepts and techniques17 example of fact constellation time_key day day_of_the_week month quarter year time location_key street city province_or_street country location sales fact table time_key item_key branch_key location_key units_sold dollars_sold avg_sales measures item_key item_name brand type supplier_type item branch_key branch_name branch_type branch shipping fact table time_key item_key shipper_key from_location to_location dollars_cost units_shipped shipper_key shipper_name location_key shipper_type shipper *data mining: concepts and techniques18 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 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 *data mining: concepts and techniques19 view of warehouses and hierarchies specification of hierarchies nschema hierarchy day month quarter; week year nset_grouping hierarchy 110 inexpensive *data mining: concepts and techniques20 物理数据模型 n物理数据模型:数据模型的第三层,它是星型图模 型在数据仓库中的实现,如物理的存取方式、数据 存储结构等。 n 在物理设计时,常常要按数据的重要程度、使用 频率以及对响应时间的要求进行分类,并将不同类 的数据分别存储在不同的存储设备中。重要程度高 、经常存取并对响应时间高的数据就存放在高速存 储设备上,如硬盘;存取频率低或对存取响应时间 要求低的数据则可以放在低速存储设备上。 *data mining: concepts and techniques21 粒度第一种形式 n粒度:对数据仓库中的数据综合程度高低的一个度量 ,它既影响数据仓库中的数据量的多少,也影响数据 仓库所能回答询问的种类。 n n粒度越小,综合程度越低,回答查询的种类越多; 粒 度越高,综合程度越高,查询的效率也越高。 n 在数据仓库中可将小粒度的数据存储在低速存储器上 ;大粒度的数据存储在高速存储器上。 *data mining: concepts and techniques22 multidimensional data nsales volume as a function of product, month, and region product region month dimensions: product, location, time hierarchical summarization paths industry region year category country quarter product city month week office day *data mining: concepts and techniques23 a sample data cube total annual sales of tv in u.s.a. date product country sum sum tv vcr pc 1qtr2qtr3qtr 4qtr u.s.a canada mexico sum *data mining: concepts and techniques24 cuboids corresponding to the cube all product date country product,dateproduct,countrydate, country product, date, country 0-d(apex) cuboid 1-d cuboids 2-d cuboids 3-d(base) cuboid *data mining: concepts and techniques25 browsing a data cube nvisualization nolap capabilities ninteractive manipulation *data mining: concepts and techniques26 粒度第二种形式:样本数据库 n样本数据库:在分析过程中,有许多探索的过程有时 分析的目的并不要求精确的结果,只需要得到相对准 确、能反映趋势的数据,所以可以提取出样本数据库 。 n样本数据库的粒度:是根据采样率的高低来划分的, 采样粒度不同的样本数据库可以具有相同的综合级别 ,它是按一定的采样率从细节数据库或轻度综合数据 库中提取的一个子集。 n 样本数据库的抽取按照数据的重要程度不同进行,利 用样本数据库采集重要数据进行分析既可提高分析效 率,又有助于抓住主要因素和主要矛盾。 *data mining: concepts and techniques27 维度 n维度:是一个物理特性(如时间、地点、产品等),它是 表达数据仓库中信息的一个基本途径,可作为标识数据的 索引。通常的报表只包含有行和列两维,但在数据仓库中 所存储的数据大多是用多维(三维或三维以上)视图表示 的。 n例如: n一个销售系统中的数据可分为时间维、产品维和地理位 置维等; n一个财务系统中的数据可分为时间维、支出维和收入维 等; n一个企业决策支持系统中的数据可分为成本开支维、销 售收入维、利润维、股票价值维等。 *data mining: concepts and techniques28 聚合 n在数据仓库技术中,每一维可包括多个层次,这 些层次反过来可以向用户提供某一层次的数据。 例如,在地理位置维中,由所有的街区组成了地 区,由所有的地区组成了城市等。聚合就是指在 维的不同层次内移动数据,从而构成维内不同层 次的数据集,使用户不仅能够在一个维度内观察 数据,而且能够在维度内的不同层次上观察数据 。 *data mining: concepts and techniques29 分解与合成 n分解与合成是在一个维度内进一步细分数据或将数据按照 另一标准组合的过程。例如,当以地理位置维观察数据时 ,用户可以首先以国家(如中国)为单位观察数据,然后 可以选择观察某一个地区(如华东地区)的数据,接下来 可以选择观察某一个省或城市(如上海)的数据,这就是 数据分解的过程。而合成则是分解的逆过程,例如用户开 始以省市为观察对象,接着再以地区、国家等为观察对象 ,就是一个数据合成的过程。 *data mining: concepts and techniques30 分割及其标准 n 分割:将数据分散到各自的物理单元中去以便能 分别处理,提高数据处理效率,数据分割后的数据 单元称为分片。 n数据分割的标准:可按日期、地域、业务领域或按 多个分割标准的组合。 n数据分割的目的:便于进行数据的重构、索引、重 组、恢复、监控、扫描 *data mining: concepts and techniques31 数据分割的方法 n垂直分割:垂直分割就是把一个表垂直分成两部分。这种类 型的分割有助于把一大堆列分成两个独立的表,这两个表之 间通过一个关键字段相关联。 n水平分割:水平分割就是把表按行分成两部分。这种类型的 分割被用来存储与用户联系紧密的本地重要数据,从而减少 网络查询。 n图解分割:经由多个分布系统把一个图分解成两部分。可以 从指定的服务器或在多个服务器之间建立连接而得到一个表 所需要的全部数据。这种类型的分割被用来把小的、静止的 表从不稳定的、越变越大的表中分割出来。 *data mining: concepts and techniques32 元数据 n元数据:是用来描述数据的数据。它描述和定 位数据组件、它们的起源及它们在数据仓库进 程中的活动;关于数据和操作的相关描述(输 入、计算和输出)。元数据可用文件存在元数 据库中。 n要有效的管理数据仓库,必须设计一个描述能 力强、内容完善的元数据。 *data mining: concepts and techniques33 元数据的种类 n转换元数据:为了从事务处理型环境向数据仓库中转 换而建立的元数据,它包含了所有源数据的信息、事 务描述、数据结构的定义、提取数据和传送数据的算 法、综合数据和净化数据的规则、数据访问和传送的 记录等。 ndss元数据:在数据仓库中用来与终端用户的多维商 业模型/前端工具之间建立映射,这种元数据常称为 dss元数据,常用来开发更先进的决策支持工具。 *data mining: concepts and techniques34 数据仓库中的元数据的内容 n关于源数据的元数据:数据源中所有物理数据结构; 所有数据项的业务定义;每个数据项更新的频率,以 及由谁或哪个过程更新的说明;每个数据项的有效值 ;其它系统中具有相同业务含义的数据项的清单。 n关于数据仓库映射的元数据。 n关于系统安全的元数据。 *data mining: concepts and techniques35 n元数据管理涉及到数据仓库构造、运行、维护的整个生命周期,是 企业级数据仓库构建过程中十分重要的一环。所谓元数据即数据的 数据,好象在一座图书馆中,如果认为每一本书的内容都是数据, 用来查找每一本书的索引就是元数据。在数据仓库的构建过程中, 会产生三种元数据即业务元数据、技术元数据、操作元
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年度多人持股企业股权转让及后续运营管理协议
- 2025年二手房买卖合同修订:智能家居设备验收标准
- 2025版年薪制员工劳动合同法实施细则解读与应用指南
- 2025年度汽车租赁服务合同规范范本
- 2025年货运司机安全责任与福利保障合同
- 2025版农民工劳动合同模板(含劳动纠纷解决)
- 2025年度绿色有机猪肉直销合作合同模板
- 2025年蔬菜种植基地社会化服务合作协议
- 2025厂房租赁居间合同(含设备配套服务)
- 贵州省玉屏侗族自治县2025年上半年公开招聘城市协管员试题含答案分析
- 2025浙江温州永嘉县国有企业面向社会招聘25人考试参考题库附答案解析
- 烧结基础理论课件
- 《家庭教育学》全套教学课件
- 法律知识培训课件
- 2024年安康社区工作者考试真题及答案
- 业财融合与价值创造课件
- 长沙市名校小升初分班考试数学试卷(含答案)
- 肺动脉栓塞护理查房
- 农村房地产转让合同协议
- 拉链专业工艺讲解
- 2025版抵押贷款抵押物抵押权登记及变更手续协议模板
评论
0/150
提交评论