ဤဆောင်းပါးသည် MongoDB ဒေတာဘေ့စ်အကြောင်း အခြေခံမှ အဆင့်မြင့်အထိ ရှင်းလင်းတင်ပြထားပြီး NoSQL ဒေတာဘေ့စ်တစ်ခုဖြစ်ကာ open source ဖြစ်သည်။
MongoDB ၏ အခြေခံသဘောတရားများ ⏱ 0:35
•MongoDB သည် open source ဖြစ်သည်။•၎င်းသည် NoSQL ဒေတာဘေ့စ်တစ်ခုဖြစ်ပြီး SQL ကို အသုံးမပြုပါ။•RDBMS (Relational Database Management System) မဟုတ်ဘဲ key-value Store ကို အသုံးပြုသည်။•Document Type Database ဖြစ်သည်။MongoDB ၏ Core Structure များ ⏱ 2:22
•MongoDB တွင် Database, Collection, Document ဟူ၍ အဆင့်ဆင့်ရှိသည်။•Collection သည် RDBMS ရှိ Table နှင့်တူပြီး Document များစုစည်းမှုဖြစ်သည်။•Document သည် JSON ပုံစံ (BSON) ဖြင့်သိမ်းဆည်းကာ key-value အတွဲများပါဝင်သည်။•Document တွင် field များရှိပြီး ၎င်းတို့သည် string, integer, array, nested object စသည့် data types များဖြစ်နိုင်သည်။MongoDB တွင် Data Model နှစ်မျိုး ⏱ 17:10
•Embedded Data Model: Document တစ်ခုအတွင်း ဆက်စပ်ဒေတာအားလုံးကို nested ပုံစံသိမ်းဆည်းခြင်း။•Normalized Data Model: ဆက်စပ်ဒေတာကို သီးခြား Collection များခွဲကာ reference (ID) ဖြင့်ချိတ်ဆက်ခြင်း။•MongoDB တွင် primary key, foreign key မရှိဘဲ reference ကိုသာ အသုံးပြုသည်။Index များအကြောင်း ⏱ 25:47
•Index သည် query များကို မြန်ဆန်စေရန် document များရှိ field များအတွက် ဖန်တီးသော data structure ဖြစ်သည်။•Collection scan ထက် index ကိုသုံးခြင်းက performance ပိုကောင်းသည်။•Compound Index ကို field အများအပြားအတွက် ဖန်တီးနိုင်သည်။•Index ဖန်တီးရာတွင် collation ကိုလည်းသတ်မှတ်နိုင်သည်။•Default အနေဖြင့် _id field တွင် unique index ရှိသည်။CRUD Operations နှင့် Aggregation ⏱ 28:44
•CRUD ဆိုသည်မှာ Create (insert), Read (find), Update, Delete ဖြစ်သည်။•Insert ကို insertOne() သို့မဟုတ် insertMany() ဖြင့်ပြုလုပ်သည်။•Aggregation Pipeline တွင် stages များပါဝင်ပြီး $match, $group, $sort, $project, $limit စသည်တို့ပါဝင်သည်။•Aggregation ကို အသုံးပြု၍ data transformation လုပ်နိုင်သည်။•Replication သည် data ကို primary မှ secondary node များသို့ ပွားကူးခြင်းဖြစ်ကာ failover အတွက်အသုံးပြုသည်။Replication နှင့် Sharding ⏱ 60:03
•Replication Set တွင် primary node နှင့် secondary node များပါဝင်ကာ data ကို automatically replicate လုပ်သည်။•Primary node ၏ data သည် secondary များသို့ copy ကူးပြီး failover ဖြစ်ပါက secondary မှ primary အသစ်ဖြစ်လာသည်။•Sharding သည် data ကို များစွာသော server များသို့ ခွဲဝေသိမ်းဆည်းခြင်းဖြစ်သည်။•MongoDB Atlas ကို cloud တွင်အသုံးပြုနိုင်ပြီး auto-scaling, backup စသည်တို့ပါဝင်သည်။•Drivers များတွင် Node.js, Java, Python, PHP, C# အစရှိသည်တို့ပါဝင်သည်။Key Takeaways
•MongoDB သည် open source NoSQL document database ဖြစ်ပြီး JSON-like document များကို သိမ်းဆည်းသည်။•Collection သည် RDBMS ၏ Table နှင့်တူပြီး Document များစုစည်းမှုဖြစ်ကာ Schema-less ဖြစ်သည်။•Data Model နှစ်မျိုးရှိသည် - Embedded (denormalized) နှင့် Normalized (reference) ပုံစံ။•Index များသည် query performance ကိုမြှင့်တင်ပေးပြီး compound index နှင့် text index များအထိရှိသည်။•Aggregation Pipeline သည် data transformation အတွက် powerful ဖြစ်ကာ stages အများအပြားကို chain လုပ်နိုင်သည်။•Replication Set သည် high availability အတွက်ဖြစ်ပြီး primary-secondary architecture ကိုအသုံးပြုသည်။Conclusion
MongoDB သည် flexible data model နှင့် scalability ကောင်းမွန်သော database ဖြစ်ကာ CRUD, aggregation, replication စသည့် features များပါဝင်သည်။