Thuta Learning
How Databases Work
IntermediateData & Databasesbeginner

Database System များ၏ Landscape

ဒီခန်းပြီးရင် ဘာတတ်သွားမလဲ

  • Database System များ၏ Landscape concept ကို နားလည်ရှင်းပြနိုင်ရန်
  • Diagram/table ကို ဖတ်ပြီး data model/schema/architecture ဘယ်လို ပုံသဏ္ဌာန်ရှိသလဲ ခြေရာခံနိုင်ရန်
  • ကိုယ့် project အတွက် database concept/system ကို ဘယ်လို အသုံးချသင့်သလဲ ရှင်းပြနိုင်ရန်

နားလည်ထားရမယ့် အချက်

Technology တစ်ခုချင်းစီရဲ့ အသေးစိတ်ကနေ ခဏတန်း ရှောင်ထွက်ပြီး database အဓိကတွေက landscape တစ်ခုလုံးမှာ ဘယ်နေရာ ရှိလဲ ကြည့်ကြည့်ရအောင်။

PostgreSQL နှင့် MySQL နှစ်ခုစလုံးက general-purpose relational database တွေဖြစ်ပါတယ်။ ဒီ site မှာ PostgreSQL course ရှိပေမယ့် MySQL မှာ မရှိသေးပါ - ဒါပေမယ့် role တူတူပါပဲ။ ဘယ်တစ်ခုမှ universal winner မဟုတ်ပါ။

SQLite ကတော့ embedded, file-based relational database တစ်ခုပါ - network server မဟုတ်ပါ။ နောက်သင်ခန်းစာမှာ ပိုနက်ရှိုင်းစွာ လေ့လာမှာပါ။

MongoDB က document-database ချဉ်းကပ်နည်းကို၊ Redis က key-value/caching ချဉ်းကပ်နည်းကို ကိုယ်စားပြုပါတယ် - နှစ်ခုစလုံးကို ဒီ site ရဲ့ course သီးသန့်တွေမှာ နက်ရှိုင်းစွာ ဖော်ပြထားပါတယ်။

Supabase Database က PostgreSQL အပေါ် တည်ဆောက်ထားတဲ့ managed platform ဖြစ်ပြီး၊ လက်တွေ့ အနက်ရှိုင်းစွာကတော့ "Cloud Providers & Platforms" course ရဲ့ Supabase သင်ခန်းစာမှာသာ ရှိပါတယ်။

Systemအခန်းကဏ္ဍ
PostgreSQLGeneral-purpose relational database, ကိုယ်ပိုင် course ရှိတယ် - PostgreSQL course ကို ဆက်လေ့လာပါ
MySQLGeneral-purpose relational database, PostgreSQL နှင့် role ဆင်တူတယ်, ဒီ site မှာ course သီးသန့် မရှိသေးပါ
SQLiteEmbedded, file-based relational database - နောက်သင်ခန်းစာမှာ ဆက်လေ့လာပါ
MongoDBDocument database - MongoDB course ကို ဆက်လေ့လာပါ
RedisKey-value store / cache - Redis course ကို ဆက်လေ့လာပါ
Supabase DatabaseManaged PostgreSQL + auth/storage/API - Cloud Providers & Platforms course ရဲ့ Supabase သင်ခန်းစာကို ဆက်လေ့လာပါ
text
DATABASE SYSTEMS LANDSCAPE
--------------------------
RELATIONAL             DOCUMENT        KEY-VALUE
PostgreSQL, MySQL      MongoDB         Redis
(server, general use)  (flexible docs) (cache, fast lookups)

SQLite
(embedded, single-file, no server process)

MANAGED PLATFORM
Supabase Database (managed PostgreSQL + auth, storage, APIs)

လက်တွေ့ scenario နဲ့ ချိတ်ကြည့်မယ်

General-purpose relational database လိုအပ်လား? PostgreSQL (ဒါမှမဟုတ် MySQL) က default အနေနှင့် ဘေးကင်းပါတယ်။ Server မလိုအပ်ဘဲ app ကိုယ်တိုင် ပါလာမယ့် database လိုအပ်လား? SQLite ကတော့ ဒီအခန်းကဏ္ဍအတွက် ကိုက်ညီပါတယ်။

Rigid table ထဲ မကိုက်ညီတဲ့ content ကို သိမ်းဖို့ လိုအပ်ရင် MongoDB ကို ကြည့်ပါ။ Session/cache/leaderboard အတွက် အလွန်မြန်တဲ့ lookup လိုအပ်ရင် Redis ကတော့ အဲဒီအလုပ်အတွက်ပါ။

Infrastructure work ကို ကျော်ဖြတ်ချင်ပြီး authentication/instant API ပါတဲ့ managed Postgres လိုအပ်ရင် Supabase Database ကို ဆန်းစစ်ကြည့်ပါ။

အောက်က runnable ဥပမာက ဒီ checklist ကို function ငယ်လေးတစ်ခုအဖြစ် ပြောင်းထားပါတယ်။

အတူတူ စမ်းရေးကြည့်မယ်

javascript
function suggestSystem(need) {
  const map = {
    "general web app relational data":
      "PostgreSQL (or MySQL) - general-purpose relational database. Continue: the PostgreSQL course.",
    "embedded mobile app storage":
      "SQLite - embedded, file-based database. Continue: this course's SQLite lesson.",
    "flexible document data":
      "MongoDB - document database. Continue: the MongoDB course.",
    "fast cache/session store":
      "Redis - key-value store. Continue: the Redis course.",
    "managed Postgres with built-in auth":
      "Supabase Database - managed PostgreSQL plus extras. Continue: the Supabase lesson in Cloud Providers & Platforms.",
  };
  return map[need] || "Not on this map yet - describe the need more specifically.";
}

[
  "general web app relational data",
  "embedded mobile app storage",
  "flexible document data",
  "fast cache/session store",
  "managed Postgres with built-in auth",
].forEach((need) => console.log(`${need} ->`, suggestSystem(need)));
You should see
general web app relational data -> PostgreSQL (or MySQL) - general-purpose relational database. Continue: the PostgreSQL course.
embedded mobile app storage -> SQLite - embedded, file-based database. Continue: this course's SQLite lesson.
flexible document data -> MongoDB - document database. Continue: the MongoDB course.
fast cache/session store -> Redis - key-value store. Continue: the Redis course.
managed Postgres with built-in auth -> Supabase Database - managed PostgreSQL plus extras. Continue: the Supabase lesson in Cloud Providers & Platforms.

Need key 5 ခုစလုံးက landscape ထဲက system တစ်ခုစီနှင့် ဆက်လက် ကြည့်ရမည့် course သို့ ကိုက်ညီစွာ map လုပ်ထားပါတယ်။

၅ မိနစ် စမ်းကြည့်

suggestSystem ရဲ့ map object ထဲ "graph-shaped relationships (social network)" ဆိုတဲ့ key အသစ်တစ်ခု ထည့်ပြီး graph database တစ်ခုကို အကြံပြုပါ။

သတိလေးတစ်ချက်

PostgreSQL/MySQL ကို "တစ်ခုက တစ်ခုထက် အမြဲပိုကောင်း" ဟု winner ရွေးပြီး ပြောခြင်း

Supabase Database ကို PostgreSQL နှင့် လုံးဝဆက်စပ်မှုမရှိတဲ့ သီးခြား product တစ်ခုအဖြစ် ထင်ခြင်း

Wikipedia: Comparison of relational database management systemsHow Databases Work

ဒီနေရာမှာ လူအများမှားတတ်တယ်

  • PostgreSQL/MySQL ကို "တစ်ခုက တစ်ခုထက် အမြဲပိုကောင်း" ဟု winner ရွေးပြီး ပြောခြင်း
  • Supabase Database ကို PostgreSQL နှင့် လုံးဝဆက်စပ်မှုမရှိတဲ့ သီးခြား product တစ်ခုအဖြစ် ထင်ခြင်း
  • ဒီ course က database concept/landscape ကို framework-neutral level မှာသာ သင်ပေးပါတယ် — SQL syntax, PostgreSQL, MongoDB, Redis ကို နက်နက်ရှိုင်းရှိုင်း လေ့လာချင်ရင် SQL, PostgreSQL, MongoDB, Redis tutorial တွေဆီ ဆက်သွားပါ။

လေ့ကျင့်ခန်း

suggestSystem ရဲ့ map object ထဲ "graph-shaped relationships (social network)" ဆိုတဲ့ key အသစ်တစ်ခု ထည့်ပြီး graph database တစ်ခုကို အကြံပြုပါ။

You'll know it worked when: general web app relational data -> PostgreSQL (or MySQL) - general-purpose relational database. Continue: the PostgreSQL course. embedded mobile app storage -> SQLite - embedded, file-based database. Continue: this course's SQLite lesson. flexible document data -> MongoDB - document database. Continue: the MongoDB course. fast cache/session store -> Redis - key-value store. Continue: the Redis course. managed Postgres with built-in auth -> Supabase Database - managed PostgreSQL plus extras. Continue: the Supabase lesson in Cloud Providers & Platforms. Need key 5 ခုစလုံးက landscape ထဲက system တစ်ခုစီနှင့် ဆက်လက် ကြည့်ရမည့် course သို့ ကိုက်ညီစွာ map လုပ်ထားပါတယ်။

Database System များ၏ Landscape | Thuta Learning