版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
DataModelReviewthebasicconceptsofdatabaseWhatisadatawarehouse?Amulti-dimensionaldatamodelDatawarehousearchitectureDatawarehouseimplementationFromdatawarehousingtodatamining數據立方體(1)數據倉庫基于一個多維度數據模型,以數據立方體的方式看待數據一個數據立方體,例如銷售量,允許數據進行建模,并在多個層面觀看Dimensiontables(維表),例如項目(項目名字,品牌,類型),或者時間(天,周,月,季度,年)Facttable(事實表)包含相關維度表的層組(例如銷售額)和鍵
在數據倉庫文獻中,一個n維基本立方體被稱為基本方體。
擁有最高級匯總的最上層的0維方體,被稱為頂端立方體。長方體晶格形成了一個數據立方體。數據立方體(2)維度和維度表維度:是一個組織要保留的觀點或實體.維度表:是進一步描述一個維度的一組屬性.每個維度有可能有與之相聯(lián)系的一個維度表.
時間,項目,地點,供應者
事實和事實表事實:衡量一個主題事實表:事實的表現(xiàn).它包含每個相關維表的事實和鍵名。事實是數值,銷售金額DataCube(3)數據立方的維度數量觀察到的維度數量.
Sales(itemtimelocationdollars_sold)基本方體:包含所有在數據倉庫中可以被觀察到的維度的立方體.頂端立方體:
不包含維度的立方體.數據立方:
一個多維度數據模型中的所有立方體.數據立方—OneExample(1)ALLElectronicssales
維度:時間,項目,地點,品牌
維度表:
time(time_keydayday_of_weekmonthquarteryear) item(item_keyitem_namebrandtypesupplier_key)
facttable:(time_keyitem_keybrand_keylocation_keydollars_soldunits_sold)數據立方—OneExample(2)2維數據立方:
location=”Vancouver”
item(type)Time(quarter)entertainment
computer
security
Q1605825400Q2680920512Q37811026501Q48241120580數據立方—OneExample(3)4維數據立方家庭娛樂計算機電話安全Q1Q2Q3Q4VanciuerTorontoNewYorkChicagoitemtimeLocationsupplierCube:ALatticeofCuboidsalltimeitemlocationsuppliertime,locationtime,supplieritem,locationitem,supplierlocation,suppliertime,item,suppliertime,location,supplieritem,location,supplier0-D(apex)cuboid1-Dcuboids2-Dcuboids3-Dcuboids4-D(base)cuboid數據倉庫的概念模型數據倉庫模型:維度&層組星型模式:中間的事實表和一組維度表相連雪花模式:是星型模式的改進,一些維度層級標準化成一組更小的維度表,形成類似雪花的形狀Factconstellations(事實星座):多個事實表共享維度表,看起來像星星的集合,因此被稱為星系模式或事實星座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的多維數據定義語法多維數據集定義(事實表)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定義事實星座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一個概念層級:維度一個概念層級定義了從一套更低級別的概念到更高、更一般的概念的映射序列。 類別:屬性的層級:地點,省,村屬性值的層級或分組對于一個給定的維度,或許會有不止一個概念層級.一個概念層級:維度(地點)allEuropeNorth_AmericaMexicoCanadaSpainGermanyVancouverM.WindL.Chan..................全部地區(qū)辦公室國家TorontoFrankfurt城市多維度數據作為產品,月份和地區(qū)的一個函數的銷售量ProductRegionMonth維度:產品,地點,時間層級匯總路徑IndustryRegionYearCategoryCountryQuarterProductCityMonthWeekOfficeDay一個數據立方樣本TotalannualsalesofTVinU.S.A.DateProductCountryAll,All,Allsumsum
TVVCRPC1Qtr2Qtr3Qtr4QtrU.S.ACanadaMexicosumCuboidsCorrespondingtotheCubeallproductdatecountryproduct,dateproduct,countrydate,countryproduct,date,country0-D(apex)cuboid1-Dcuboids2-Dcuboids3-D(base)cuboid數據倉庫和層級結構的觀察可視化OLAP功能交互操作典型的OLAP操作上卷(上鉆):
匯總數據通過爬升到更高的層級或者是減少維度下鉆(下卷):
與上卷相反從更高層級的匯總到更低層級的匯總或者使數據詳細化,或者引進新的維度切片和切塊:
在一個或更多的維度上投射或選擇旋轉(rotate):
重新定位立方體,可視化,3D到一系列的2D平面其他操作交叉探查:
涉及不止一個事實表鉆取:
從立方體的最底層到它后端的相關表(用SQL)典型的OLAP操作(1)Rollup上卷(drill-up上鉆):匯總數據通過爬升到更高的層級(減少維度)
roll-uponlocationfromcitiestocountiesQ1Q2Q3Q4ChicagoNewYorkVancouverTVCDPC710820402471605Q1Q2Q3Q4USACanada1181605TVCDPC典型的OLAP操作(2)Rolldown下卷(Drilldown下鉆):與上卷相反從更高層級的匯總到更低層級的匯總或者使數據詳細化,或者引進新的維度
drill-downontimefromquarterstomonthsQ1Q2Q3Q4ChicagoNewYorkVancouverTVCDPC710820402471605TVCDPCNewYorkVancouverChicagoJanFebMarAprMayJunJulAugSepOctNovDec102150150典型的OLAP操作(3)Slice(切片)anddice(切塊):
投射和選擇
Q1Q2Q3Q4ChicagoNewYorkVancouverTVCD
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 深圳股權轉讓合同(2025年版)4篇
- 商場LED顯示屏租賃合同(二零二五年)
- 二零二五年度國際法學與留學項目合同3篇
- 2025年度個人一手房買賣合同環(huán)保標準范本4篇
- 2025版戶外休閑場所草皮采購與租賃合同3篇
- 2025年智能家居系統(tǒng)產品銷售激勵協(xié)議書2篇
- 2025版團購樓房指標轉讓與房地產咨詢代理合同3篇
- 2025版智能防蚊紗窗研發(fā)與銷售合作協(xié)議3篇
- 2025年度個人投資分紅收據模板制作服務協(xié)議4篇
- 2025年度互聯(lián)網金融服務提供商合作協(xié)議范本4篇
- 骨髓穿刺課件
- 鄉(xiāng)村治理中正式制度與非正式制度的關系解析
- 2024版義務教育小學數學課程標準
- 智能護理:人工智能助力的醫(yī)療創(chuàng)新
- 國家中小學智慧教育平臺培訓專題講座
- 5G+教育5G技術在智慧校園教育專網系統(tǒng)的應用
- VI設計輔助圖形設計
- 淺談小學勞動教育的開展與探究 論文
- 2023年全國4月高等教育自學考試管理學原理00054試題及答案新編
- 河北省大學生調研河北社會調查活動項目申請書
- JJG 921-2021環(huán)境振動分析儀
評論
0/150
提交評論