Thuta Learning
How Databases Work
BasicData & Databasesbeginner

Data ဆိုတာ ဘာလဲ? Database ဆိုတာ ဘာလဲ?

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

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

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

Data ဆိုတာ system တစ်ခုက storage လုပ်ထားတဲ့ (သို့) အလုပ်လုပ်နေတဲ့ value (သို့) information ပါပဲ — user ရဲ့ name, email, product ရဲ့ price, order တစ်ခု, chat message တစ်ခု စသဖြင့်ပါ။ Application လုပ်တဲ့ almost အားလုံးဟာ data ကို ဖတ်ခြင်း (သို့) ပြောင်းလဲခြင်းသာ ဖြစ်ပါတယ်။

  • Structured — fixed, predictable format (name/age ပါတဲ့ spreadsheet row)
  • Semi-structured — organization အနည်းငယ်ရှိ, rigid မဟုတ် (tag ပါတဲ့ log line)
  • Unstructured — built-in structure လုံးဝမရှိ (free text paragraph)

Database ဆိုတာ data ကို growth ဖြစ်လာသည်ဖြစ်စေ၊ လူတွေများစွာ တစ်ပြိုင်နက် သုံးနေသည်ဖြစ်စေ reliable စွာ store, organize, retrieve, update လုပ်ပေးဖို့ တီထွင်ထားတဲ့ system တစ်ခုပါ။ Learning platform ရဲ့ Users, Courses, Lessons, Progress, Bookmarks ကို စဉ်းစားကြည့်ပါ။

Database က ကူညီပေးတာဘာကြောင့်
Searchingrecord ထောင်ချီထဲက data ကို မြန်မြန်ရှာနိုင်တယ်
Relationshipsdata အစိတ်အပိုင်းတွေအကြား ချိတ်ဆက်မှုကို model ချနိုင်တယ်
Concurrency & integrityuser များစွာ တစ်ပြိုင်နက်သုံးရင် data ပျက်စီးမသွားအောင် ကာကွယ်တယ်
Transactions & backupschange တွေကို group လုပ်ပြီး၊ backup, access control, index လုပ်ပေးတယ်

File တွေက အမြဲ မှားတာမဟုတ်

script သေးသေး, personal project, data အနည်းငယ်သာရှိတဲ့ static site အတွက်တော့ plain file (သို့) JSON file တစ်ခုတည်း သုံးတာ ကျိုးကြောင်းညီပါတယ်။

Structured Data
fixed, predictable format တစ်ခုနဲ့ ကိုက်ညီတဲ့ data — column နဲ့ data type သိသာတဲ့ table row တစ်ခု လိုမျိုးပါ။
Unstructured Data
built-in structure လုံးဝမရှိတဲ့ data — free text paragraph, image, audio recording တစ်ခု လိုမျိုးပါ။
text
THE CRUD MENTAL MODEL
---------------------
THE CRUD MENTAL MODEL
-----------------------
Application
    |
    v
 Database
    |
    +--> Store    (Create)
    +--> Read     (Retrieve)
    +--> Update   (Modify)
    +--> Delete   (Remove)

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

တစ်ခုခုကို 'database' အပြည့်အစုံ လိုအပ်သလားလို့ ဆုံးဖြတ်ချင်ရင် — user နှစ်ယောက် တစ်ပြိုင်နက်တည်း feature ကို သုံးရင် ဘာပျက်မလဲ၊ crash ဖြစ်ရင် data ဆက်ရှိဖို့ လိုသလား၊ record ထောင်ချီကို instant ရှာဖို့ လိုသလား စဉ်းစားကြည့်ပါ။

အဖြေက 'အရေးကြီးတာ ဘာမှ မပျက်ဘူး' ဆိုရင် flat file (သို့) JSON file သေးသေးတစ်ခုက တကယ့်ကို ကောင်းပါတယ်။ concurrent write, relationship, fast search တွေက real requirement ဖြစ်လာမှသာ database သုံးဖို့ signal ဖြစ်လာပါတယ်။

Structured

field သိထားတဲ့ clean object

Semi-structured

structure အနည်းငယ်ရှိပေမယ့် flexible

Unstructured

free-form text

ဒီ distinction က ဒီ course ရဲ့ နောက်ပိုင်းက SQL-vs-NoSQL conversation ကို ကြိုတင်ညွှန်းပါတယ် — relational database တွေက structured data အတွက်၊ NoSQL database တချို့ကတော့ semi-structured/unstructured data အတွက် တီထွင်ထားကြတာပါ။

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

javascript
function classifyData(sample) {
  if (typeof sample === "object" && sample !== null && !Array.isArray(sample)) {
    return "structured";
  }
  if (typeof sample === "string") {
    const looksTagged = /\w+[:=]\S+/.test(sample) && sample.trim().split(/\s+/).length > 1;
    return looksTagged ? "semi-structured" : "unstructured";
  }
  return "unknown";
}

const examples = [
  { label: "User record object", value: { id: 1, name: "Aye Aye", email: "aye@example.com" } },
  { label: "Support message text", value: "Hi, my payment failed twice yesterday and I'm not sure why." },
  { label: "Server log line", value: '2026-08-24T10:15:00Z level=error user_id=42 msg="login failed"' },
];

for (const ex of examples) {
  console.log(`${ex.label} -> ${classifyData(ex.value)}`);
}
You should see
User record object -> structured
Support message text -> unstructured
Server log line -> semi-structured

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

classifyData function ကို သင့် app ရဲ့ real data တစ်ခု (ဥပမာ - user ရဲ့ bio field, error log, order object) နဲ့ စမ်းသပ်ပြီး classification မှန်မမှန် စစ်ဆေးပါ။

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

concurrent user မရှိတဲ့ prototype page နှစ်ခုအတွက်တောင် database အပြည့်အစုံ လိုတယ်လို့ ယူဆခြင်း

'unstructured' ဆိုတာ 'အသုံးမကျဘူး' လို့ ထင်ခြင်း — support message တွေလို အရေးကြီးတဲ့ data များစွာဟာ unstructured ပါ

Wikipedia: Semi-structured dataHow Databases Work

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

  • concurrent user မရှိတဲ့ prototype page နှစ်ခုအတွက်တောင် database အပြည့်အစုံ လိုတယ်လို့ ယူဆခြင်း
  • 'unstructured' ဆိုတာ 'အသုံးမကျဘူး' လို့ ထင်ခြင်း — support message တွေလို အရေးကြီးတဲ့ data များစွာဟာ unstructured ပါ
  • ဒီ course က database concept/landscape ကို framework-neutral level မှာသာ သင်ပေးပါတယ် — SQL syntax, PostgreSQL, MongoDB, Redis ကို နက်နက်ရှိုင်းရှိုင်း လေ့လာချင်ရင် SQL, PostgreSQL, MongoDB, Redis tutorial တွေဆီ ဆက်သွားပါ။

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

classifyData function ကို သင့် app ရဲ့ real data တစ်ခု (ဥပမာ - user ရဲ့ bio field, error log, order object) နဲ့ စမ်းသပ်ပြီး classification မှန်မမှန် စစ်ဆေးပါ။

You'll know it worked when: User record object -> structured Support message text -> unstructured Server log line -> semi-structured

Data ဆိုတာ ဘာလဲ? Database ဆိုတာ ဘာလဲ? | Thuta Learning