iT邦幫忙

0

什麼是Type 1 Slow Change Dimension

起頭:
做題目時,看到一題 Type 1 Slow Change Dimension是紀錄所有的資料變化 ,對還錯?
什麼是Type 1 Slow Change Dimension 呢?

Ans:
簡單的說OLTP是放交易資料的地方,而OLAP就是放要分析&匯總後的資料(對厚,那匯總後的資料是type什麼?)
我們會把OLTP的資料,放到OLAP來,以利分析.
為什麼不放在OLTP裡分析呢?因為OLTP資料庫,通常是設計要應付少量但頻繁寫入.而不是大量資料讀取的.所以我們才要用設計為大量讀取分析的OLAP!
而Type 1 Slow Change Dimension 就是LOAP資料表結構中的一種.

如果OLAP table和OLTP table 一樣,那就是type1.
如果有記錄歷程,那就是type2
如果有只記錄最近2次,那就是type3
以下用OLTP與OLAP的資料結構來介紹,就會很清楚.

OLTP table
https://ithelp.ithome.com.tw/upload/images/20190213/20106764PuRuTGQ0HH.png

PLAP type1 (資料結構跟OLTP的資料一樣)
https://ithelp.ithome.com.tw/upload/images/20190213/20106764KkkkFJYppz.png

PLAP type2 (有歷程) type2就可以如下表現
https://ithelp.ithome.com.tw/upload/images/20190213/20106764DjZN6ntsFU.png
用current,就不用取max(DWID)
https://ithelp.ithome.com.tw/upload/images/20190213/20106764TUg9biY4i0.png
有效期間
https://ithelp.ithome.com.tw/upload/images/20190213/20106764BWMt9WRKp7.png
綜合 current + 有效期間
https://ithelp.ithome.com.tw/upload/images/20190213/20106764P2h6HDKD5B.png

PLAP type3(只記錄上一個歷程) type3表現如下
https://ithelp.ithome.com.tw/upload/images/20190213/20106764SMIhhypDNW.png

*OLTP 交易資料,通常用的是關聯式資料庫
*OLAP 分析資料,通常用的是資料倉儲.read多,update少.

ref
https://www.cnblogs.com/biwork/p/3363749.html
什麼是OLTP/OLAP
https://kknews.cc/tech/jrb9z6.html


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言