Keys

  • Natural Key : "Business Key" created at operational source system, defined by business rules outside the control of DW. Business data ထဲမှာရှိတဲ့ data column တစ်ခုရဲ့ တန်ဖိုးကို အခြေခံပြီး ပေးတဲ့ key အမျိုးအစားပါ။ ဒီ key ကို ကြည့်ပြီးရင် အဓိပ္ပါယ်တစ်ခုလဲ ဖော်နိုင်ပါတယ်။ ဥပမာ၊ Yangon ကို YGN လို့ ပေးတာမျိုး၊ ဝန်ထမ်းတွေကို သက်ဆိုင်ရာ ဌာနပေါ်မူတည်ပြီး Sales001 စသည်ဖြင့် ပေးတာမျိုးပါ။ Data Warehouse ကနေ ထိန်းချုပ်ဖို့ ခက်ပါတယ်။ အချိန်နဲ့အမျှ ပြောင်းလဲမှု ရှိနိုင်ပါတယ်။
  • Supernatural Key (Durable Natural Key): is created at DW and persistent through the life time. Data Warehouse က create လုပ်တဲ့ key မျိုးပါ။ Natural Key ကို အခြေခံပြီး တည်ဆောက်ပေမယ့် နောက်မှာလဲ မပြောင်းလဲတဲ့ Key မျိုးပါ။ Account Code လိုမျိုးဥပမာ ကြည့်လို့ ရပါတယ်။ အသုံးပြုမှု နည်းပါတယ်။
  • Surrogate Key (Primary Key) : a column or set of columns that can be declared as primary key that is unique for each record. Data Warehouse က record တွေမှာ duplicate မဖြစ်အောင် primary key လိုမျိုးကို column တစ်ခု သို့ column တစ်ခုထက်ပိုပြီး ပေးပါတယ်။ Natural key နေရာမှာ အစားထိုးထည့်တာ ဖြစ်တဲ့အတွက် Surrogate Key လို့ ခေါ်ပါတယ်။ အများအားဖြင့် serialize key တွေဖြစ်ပါတယ်။ User အနေနဲ့ ကြည့်ရင် ဘာမှ အဓိပ္ပါယ်မဖွင့်နိုင်တဲ့ အတွက် display မှာ ပြလေ့မရှိပဲ hide လုပ်ထားလေ့ရှိပါတယ်။ table relation တွေ လုပ်တဲ့အခါမှာ ဒီ Key ကိုသုံးပြီး ချိတ်လေ့ရှိပါတယ်။ တခါ တည်ဆောက်ပြီးရင် နောင်မှာလဲ အပြောင်းအလဲ မရှိတဲ့ key ဖြစ်ပါတယ်။