版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
DataModelReviewthebasicconceptsofdatabaseWhatisadatawarehouse?Amulti-dimensionaldatamodelDatawarehousearchitectureDatawarehouseimplementationFromdatawarehousingtodatamining數(shù)據(jù)立方體(1)數(shù)據(jù)倉(cāng)庫基于一個(gè)多維度數(shù)據(jù)模型,以數(shù)據(jù)立方體的方式看待數(shù)據(jù)一個(gè)數(shù)據(jù)立方體,例如銷售量,允許數(shù)據(jù)進(jìn)行建模,并在多個(gè)層面觀看Dimensiontables(維表),例如項(xiàng)目(項(xiàng)目名字,品牌,類型),或者時(shí)間(天,周,月,季度,年)Facttable(事實(shí)表)包含相關(guān)維度表的層組(例如銷售額)和鍵
在數(shù)據(jù)倉(cāng)庫文獻(xiàn)中,一個(gè)n維基本立方體被稱為基本方體。
擁有最高級(jí)匯總的最上層的0維方體,被稱為頂端立方體。長(zhǎng)方體晶格形成了一個(gè)數(shù)據(jù)立方體。數(shù)據(jù)立方體(2)維度和維度表維度:是一個(gè)組織要保留的觀點(diǎn)或?qū)嶓w.維度表:是進(jìn)一步描述一個(gè)維度的一組屬性.每個(gè)維度有可能有與之相聯(lián)系的一個(gè)維度表.
時(shí)間,項(xiàng)目,地點(diǎn),供應(yīng)者
事實(shí)和事實(shí)表事實(shí):衡量一個(gè)主題事實(shí)表:事實(shí)的表現(xiàn).它包含每個(gè)相關(guān)維表的事實(shí)和鍵名。事實(shí)是數(shù)值,銷售金額DataCube(3)數(shù)據(jù)立方的維度數(shù)量觀察到的維度數(shù)量.
Sales(itemtimelocationdollars_sold)基本方體:包含所有在數(shù)據(jù)倉(cāng)庫中可以被觀察到的維度的立方體.頂端立方體:
不包含維度的立方體.數(shù)據(jù)立方:
一個(gè)多維度數(shù)據(jù)模型中的所有立方體.數(shù)據(jù)立方—OneExample(1)ALLElectronicssales
維度:時(shí)間,項(xiàng)目,地點(diǎn),品牌
維度表:
time(time_keydayday_of_weekmonthquarteryear) item(item_keyitem_namebrandtypesupplier_key)
facttable:(time_keyitem_keybrand_keylocation_keydollars_soldunits_sold)數(shù)據(jù)立方—OneExample(2)2維數(shù)據(jù)立方:
location=”Vancouver”
item(type)Time(quarter)entertainment
computer
security
Q1605825400Q2680920512Q37811026501Q48241120580數(shù)據(jù)立方—OneExample(3)4維數(shù)據(jù)立方家庭娛樂計(jì)算機(jī)電話安全Q1Q2Q3Q4VanciuerTorontoNewYorkChicagoitemtimeLocationsupplierCube:ALatticeofCuboidsalltimeitemlocationsuppliertime,locationtime,supplieritem,locationitem,supplierlocation,suppliertime,item,suppliertime,location,supplieritem,location,supplier0-D(apex)cuboid1-Dcuboids2-Dcuboids3-Dcuboids4-D(base)cuboid數(shù)據(jù)倉(cāng)庫的概念模型數(shù)據(jù)倉(cāng)庫模型:維度&層組星型模式:中間的事實(shí)表和一組維度表相連雪花模式:是星型模式的改進(jìn),一些維度層級(jí)標(biāo)準(zhǔn)化成一組更小的維度表,形成類似雪花的形狀Factconstellations(事實(shí)星座):多個(gè)事實(shí)表共享維度表,看起來像星星的集合,因此被稱為星系模式或事實(shí)星座ExampleofStarSchema
time_keydayday_of_the_weekmonthquarteryeartimelocation_keystreetcitystate_or_provincecountrylocationSalesFactTable
time_key
item_key
branch_key
location_key
units_sold
dollars_sold
avg_salesMeasuresitem_keyitem_namebrandtypesupplier_typeitembranch_keybranch_namebranch_typebranchExampleofSnowflakeSchematime_keydayday_of_the_weekmonthquarteryeartimelocation_keystreetcity_keylocationSalesFactTable
time_key
item_key
branch_key
location_key
units_sold
dollars_sold
avg_salesMeasuresitem_keyitem_namebrandtypesupplier_keyitembranch_keybranch_namebranch_typebranchsupplier_keysupplier_typesuppliercity_keycitystate_or_provincecountrycityExampleofFactConstellationsSchematime_keydayday_of_the_weekmonthquarteryeartimelocation_keystreetcityprovince_or_statecountrylocationSalesFactTabletime_key
item_key
branch_key
location_key
units_sold
dollars_sold
avg_salesMeasuresitem_keyitem_namebrandtypesupplier_typeitembranch_keybranch_namebranch_typebranchShippingFactTabletime_key
item_key
shipper_key
from_location
to_location
dollars_cost
units_shippedshipper_keyshipper_namelocation_keyshipper_typeshipper在DMQL的多維數(shù)據(jù)定義語法多維數(shù)據(jù)集定義(事實(shí)表)definecube<cube_name>[<dimension_list>]:<measure_list>維度定義(維度表)definedimension<dimension_name>as(<attribute_or_subdimension_list>)特例(共享維度表)Firsttimeas“cubedefinition”definedimension<dimension_name>as<dimension_name_first_time>incube<cube_name_first_time>在DMQL定義星型模式definecubesales_star[time,item,branch,location]:dollars_sold=sum(sales_in_dollars),avg_sales=avg(sales_in_dollars),units_sold=count(*)definedimensiontimeas(time_key,day,day_of_week,month,quarter,year)definedimensionitemas(item_key,item_name,brand,type,supplier_type)definedimensionbranchas(branch_key,branch_name,branch_type)definedimensionlocationas(location_key,street,city,province_or_state,country)在DMQL定義雪花模式definecubesales_snowflake[time,item,branch,location]:dollars_sold=sum(sales_in_dollars),avg_sales=avg(sales_in_dollars),units_sold=count(*)definedimensiontimeas(time_key,day,day_of_week,month,quarter,year)definedimensionitemas(item_key,item_name,brand,type,supplier(supplier_key,supplier_type))definedimensionbranchas(branch_key,branch_name,branch_type)definedimensionlocationas(location_key,street,city(city_key,province_or_state,country))在DMQL定義事實(shí)星座definecubesales[time,item,branch,location]:dollars_sold=sum(sales_in_dollars),avg_sales=avg(sales_in_dollars),units_sold=count(*)definedimensiontimeas(time_key,day,day_of_week,month,quarter,year)definedimensionitemas(item_key,item_name,brand,type,supplier_type)definedimensionbranchas(branch_key,branch_name,branch_type)definedimensionlocationas(location_key,street,city,province_or_state,country)definecubeshipping[time,item,shipper,from_location,to_location]:dollar_cost=sum(cost_in_dollars),unit_shipped=count(*)definedimensiontimeastimeincubesalesdefinedimensionitemasitemincubesalesdefinedimensionshipperas(shipper_key,shipper_name,locationaslocationincubesales,shipper_type)definedimensionfrom_locationaslocationincubesalesdefinedimensionto_locationaslocationincubesales一個(gè)概念層級(jí):維度一個(gè)概念層級(jí)定義了從一套更低級(jí)別的概念到更高、更一般的概念的映射序列。 類別:屬性的層級(jí):地點(diǎn),省,村屬性值的層級(jí)或分組對(duì)于一個(gè)給定的維度,或許會(huì)有不止一個(gè)概念層級(jí).一個(gè)概念層級(jí):維度(地點(diǎn))allEuropeNorth_AmericaMexicoCanadaSpainGermanyVancouverM.WindL.Chan..................全部地區(qū)辦公室國(guó)家TorontoFrankfurt城市多維度數(shù)據(jù)作為產(chǎn)品,月份和地區(qū)的一個(gè)函數(shù)的銷售量ProductRegionMonth維度:產(chǎn)品,地點(diǎn),時(shí)間層級(jí)匯總路徑IndustryRegionYearCategoryCountryQuarterProductCityMonthWeekOfficeDay一個(gè)數(shù)據(jù)立方樣本TotalannualsalesofTVinU.S.A.DateProductCountryAll,All,Allsumsum
TVVCRPC1Qtr2Qtr3Qtr4QtrU.S.ACanadaMexicosumCuboidsCorrespondingtotheCubeallproductdatecountryproduct,dateproduct,countrydate,countryproduct,date,country0-D(apex)cuboid1-Dcuboids2-Dcuboids3-D(base)cuboid數(shù)據(jù)倉(cāng)庫和層級(jí)結(jié)構(gòu)的觀察可視化OLAP功能交互操作典型的OLAP操作上卷(上鉆):
匯總數(shù)據(jù)通過爬升到更高的層級(jí)或者是減少維度下鉆(下卷):
與上卷相反從更高層級(jí)的匯總到更低層級(jí)的匯總或者使數(shù)據(jù)詳細(xì)化,或者引進(jìn)新的維度切片和切塊:
在一個(gè)或更多的維度上投射或選擇旋轉(zhuǎn)(rotate):
重新定位立方體,可視化,3D到一系列的2D平面其他操作交叉探查:
涉及不止一個(gè)事實(shí)表鉆取:
從立方體的最底層到它后端的相關(guān)表(用SQL)典型的OLAP操作(1)Rollup上卷(drill-up上鉆):匯總數(shù)據(jù)通過爬升到更高的層級(jí)(減少維度)
roll-uponlocationfromcitiestocountiesQ1Q2Q3Q4ChicagoNewYorkVancouverTVCDPC710820402471605Q1Q2Q3Q4USACanada1181605TVCDPC典型的OLAP操作(2)Rolldown下卷(Drilldown下鉆):與上卷相反從更高層級(jí)的匯總到更低層級(jí)的匯總或者使數(shù)據(jù)詳細(xì)化,或者引進(jìn)新的維度
drill-downontimefromquarterstomonthsQ1Q2Q3Q4ChicagoNewYorkVancouverTVCDPC710820402471605TVCDPCNewYorkVancouverChicagoJanFebMarAprMayJunJulAugSepOctNovDec102150150典型的OLAP操作(3)Slice(切片)anddice(切塊):
投射和選擇
Q1Q2Q3Q4ChicagoNewYorkVancouverTVCD
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 電動(dòng)車專賣店銷售協(xié)議書
- 教育技術(shù)專業(yè)工具操作作業(yè)指導(dǎo)書
- 2025年貴陽貨運(yùn)資格證題目答案
- 2024-2025學(xué)年三年級(jí)語文下冊(cè)第三單元12一幅名揚(yáng)中外的畫作業(yè)設(shè)計(jì)新人教版
- 2024年高中歷史第一單元古代中國(guó)的政治制度易混易錯(cuò)高考體驗(yàn)含解析新人教版必修1
- 四年級(jí)混合運(yùn)算計(jì)算題100題
- 五年級(jí)蘇教版數(shù)學(xué)下冊(cè)《質(zhì)數(shù)與合數(shù)》聽評(píng)課記錄(校內(nèi)大組)
- 2022-2023學(xué)年第二學(xué)期高一中職數(shù)學(xué)期末考試模擬測(cè)試題
- 粵教版道德與法治八年級(jí)下冊(cè)8.1《社會(huì)合作與公平》聽課評(píng)課記錄2
- 空壓機(jī)維修及保養(yǎng)合同范本
- 高二語文早讀材料積累(1-20周)課件159張
- 規(guī)劃收費(fèi)標(biāo)準(zhǔn)
- 讀《教師成長(zhǎng)力-專業(yè)成長(zhǎng)圖譜》有感
- 自動(dòng)化儀表工程施工及質(zhì)量驗(yàn)收規(guī)范
- 邵陽市職工勞動(dòng)能力鑒定表
- 胎膜早破的護(hù)理PPT
- GB/T 308.1-2013滾動(dòng)軸承球第1部分:鋼球
- 新員工入場(chǎng)安全教育培訓(xùn)課件
- 2023機(jī)械工程師考試試題及答案
- 精選裝飾工程室內(nèi)拆除專項(xiàng)施工方案
- 2022年二年級(jí)生命安全教育教案
評(píng)論
0/150
提交評(píng)論