Alternate Key နှင့် Non-Keys
Alternate Key ဆိုတာ ဘာလဲ?
Section titled “Alternate Key ဆိုတာ ဘာလဲ?”Alternate Key ဆိုတာ Table တစ်ခုမှာ ရှိတဲ့ Candidate Keys တွေထဲကမှ Primary Key အဖြစ် ရွေးချယ်မခံရဘဲ ကျန်ရစ်ခဲ့တဲ့ Key များကို ခေါ်ဆိုတာ ဖြစ်ပါတယ်။
Alternate Key ရဲ့ အဓိက အရေးပါပုံ
Section titled “Alternate Key ရဲ့ အဓိက အရေးပါပုံ”- Alternate Key များသည် Primary Key ကဲ့သို့ပင် Record များကို တိကျစွာ ခွဲခြားပေးနိုင်စွမ်း ရှိကြပါတယ်။
- Database တည်ဆောက်တဲ့အခါ Alternate Key များကို
UNIQUE Indexသတ်မှတ်ပေးခြင်းဖြင့် Data ရှာဖွေရ မြန်ဆန်အောင် (Query Performance မြှင့်တင်ရန်) အသုံးပြုကြပါတယ်။
Non-Key ဆိုတာ ဘာလဲ?
Section titled “Non-Key ဆိုတာ ဘာလဲ?”Non-Key ဆိုတာ Candidate Key, Primary Key, Alternate Key, Foreign Key မည်သည့် Key အမျိုးအစားမှ မဟုတ်သည့် သာမန် Data Field များကို ခေါ်ဆိုခြင်း ဖြစ်ပါတယ်။
သူတို့ရဲ့ ရည်ရွယ်ချက်က Record တွေကို Unique ခွဲခြားဖို့ သို့မဟုတ် Table ချိတ်ဆက်ဖို့ မဟုတ်ဘဲ၊ သက်ဆိုင်ရာ Entity ရဲ့ သာမန် အချက်အလက် (Attributes) များကို ဖော်ပြ သိမ်းဆည်းရန် ဖြစ်ပါတယ်။
ဥပမာ - employees Table တွင် name, address, hire_date စသည့် Field များသည် သာမန် Data သိမ်းဆည်းခြင်း ဖြစ်၍ Non-Keys တွေ ဖြစ်ကြပါတယ်။
Key ဝေါဟာရများ အနှစ်ချုပ်
Section titled “Key ဝေါဟာရများ အနှစ်ချုပ်”| ဝေါဟာရ (Term) | အဓိပ္ပာယ် (Description) |
|---|---|
| Candidate Key | Record များကို Unique ခွဲခြားနိုင်သော Key များ (Primary Key ဖြစ်ခွင့်ရှိသူများ) |
| Primary Key | Candidate Keys ထဲမှ အဓိက သတ်မှတ်ထားသော Unique Key တစ်ခု |
| Alternate Key | Primary Key အဖြစ် ရွေးချယ်မခံရဘဲ ကျန်ရစ်ခဲ့သော Candidate Keys များ |
| Foreign Key | Parent Table နှင့် ချိတ်ဆက် (Link) ရန် Child Table တွင် သုံးသည့် Key |
| Non-Key | မည်သည့် Key မှ မဟုတ်သော သာမန် Attribute Field များ |