Why Databases? Data, Information & the Need for DBMS

Database কেন? ডেটা, তথ্য ও DBMS-এর প্রয়োজন

Read: ~25 min Beginner 6 practice problems Live SQL runner

1. The First Question — What Is Data, Really?

Open your phone and look at any app you used today: bKash, Pathao, Daraz, Facebook, even your university's student portal. Behind every screen there is a single, quiet hero — a database. Without it, none of those apps could remember who you are, what you ordered, how much money you have, or where the rider is right now.

Before we can talk about databases, we need to be precise about one word: data. Data is raw, unorganised facts — a phone number, a price, a date, a name. By itself, data does not tell you anything useful. The number 17500 is just a number. But the moment you give it context — "Rahim's salary in BDT for October" — it becomes information.

আপনার ফোনে যত অ্যাপ আছে — bKash, Pathao, Daraz, Facebook, আপনার বিশ্ববিদ্যালয়ের পোর্টাল — প্রতিটি অ্যাপের পেছনে নীরব নায়ক হলো একটি database। এটি ছাড়া অ্যাপগুলো আপনাকে চিনত না, আপনার অর্ডার মনে রাখত না, ব্যালেন্স গণনা করতে পারত না। Data মানে কাঁচা তথ্য — যেমন একটি সংখ্যা 17500। কিন্তু যখন বলবেন "Rahim-এর অক্টোবর মাসের বেতন (টাকায়) 17500" — তখনই data পরিণত হয় information-এ।

A database is just a structured place to keep data — and a DBMS (Database Management System) is the program that turns that data into reliable, queryable, multi-user information. This first module answers: why bother? Why not just use a text file or a spreadsheet?

2. Data vs Information vs Knowledge

These three words are used interchangeably in daily Bangla and English, but in computer science they mean very different things. The DIK pyramid below is the cleanest way to remember the distinction.

"Data", "তথ্য" এবং "জ্ঞান" — কথোপকথনে আমরা এই তিনটি শব্দ একই অর্থে ব্যবহার করি, কিন্তু কম্পিউটার সায়েন্সে এদের অর্থ আলাদা। নিচের পিরামিড দেখুন।
Knowledge (জ্ঞান) Information (তথ্য) Data (কাঁচা ডেটা) 17500, 'Rahim', '2025-10-15', 'BDT' "Rahim earned 17,500 BDT on Oct 15" "October sales rose 12% — hire more staff" Figure 1.1 — DIK পিরামিড: Data → Information → Knowledge.
TermDefinitionবাংলায়
DataRaw, unprocessed facts — numbers, characters, dates with no context.প্রসঙ্গবিহীন কাঁচা তথ্য (যেমন 17500, 'Rahim')।
InformationData given context, structure, and meaning.প্রসঙ্গসহ, অর্থপূর্ণ ডেটা।
KnowledgePatterns and decisions extracted from information over time.তথ্য থেকে পাওয়া প্যাটার্ন বা সিদ্ধান্ত।
DatabaseA structured collection of related data, stored to be retrieved efficiently.সম্পর্কযুক্ত ডেটার একটি কাঠামোগত সংগ্রহ।
DBMSThe software that lets you create, query, and protect a database.যে software দিয়ে database তৈরি, query ও সুরক্ষা করা হয়।

3. Why Not Just Use a Text File or a Spreadsheet?

This is the most honest question a beginner can ask. After all, a CSV file works. Excel works. Notepad works. So why do bKash, Daraz, and the Election Commission not just use a giant Excel sheet?

The answer is that flat files are perfect for one user, one machine, a few hundred rows. They start to crack the moment any one of these is true:

  • Two or more people need to read or write at the same time.
  • Power may fail in the middle of a write.
  • Data must remain consistent — no negative bKash balances, no two students with the same roll number.
  • Querying must be fast on millions of rows ("show all orders from Khulna last week, by amount").
  • Different users should see different parts of the data (a cashier sees totals, an analyst sees raw rows).
একটি CSV বা Excel ফাইল এক ব্যক্তির, এক মেশিনের, কিছু শত row-এর জন্য ঠিক আছে। কিন্তু যখনই দুজন একসঙ্গে লেখে, কারেন্ট চলে যায়, কোটি row থেকে দ্রুত খোঁজা লাগে, বা balance কখনোই ঋণাত্মক হওয়া যাবে না — তখনই flat file ভেঙে পড়ে। এই সমস্যাগুলো সমাধান করার জন্যই DBMS তৈরি হয়েছে।
Real-world horror story
Imagine bKash storing balances in a CSV. Two cash-in transactions for the same wallet hit the file at the same millisecond. Both processes read the old balance (say 500), both add their amount, and both write back. One write overwrites the other — money simply vanishes. A DBMS makes this category of bug impossible through transactions.

ভাবুন bKash যদি balance একটি CSV-তে রাখত। একই মুহূর্তে দুটি cash-in হলে দুজনই পুরোনো balance পড়ে, যোগ করে, ফিরে লেখে — একটি লেখা অন্যটিকে মুছে দেয়, টাকা হাওয়া হয়ে যায়। DBMS-এর transaction এই ধরনের বাগ পুরোপুরি অসম্ভব করে তোলে।

4. The Four Guarantees a DBMS Gives You

Every serious DBMS — SQLite, PostgreSQL, MySQL, Oracle — provides four pillars that no plain file can:

A reliable DBMS — every query rests on these four pillars Concurrency Many users at once no lost updates (একসাথে অনেকে) Integrity Rules enforced — no impossible data (নিয়ম ভাঙা যাবে না) Durability Survives crashes & power failure (crash-এও টেকে) Querying SQL — ask anything, get fast answers (SQL দিয়ে দ্রুত উত্তর) Figure 1.2 — DBMS-এর চারটি স্তম্ভ।
একটি ভালো DBMS-এর চারটি প্রতিশ্রুতি: (১) Concurrency — হাজার ব্যবহারকারী একসঙ্গে লিখলেও কোনো লেখা হারাবে না। (২) Integrity — অসম্ভব ডেটা ঢুকবে না (যেমন ঋণাত্মক balance, NID-তে ফাঁকা নাম)। (৩) Durability — কারেন্ট চলে গেলেও commit হওয়া ডেটা টিকে থাকবে। (৪) Querying — SQL দিয়ে যেকোনো প্রশ্ন দ্রুত করা যাবে।

Let us see all four in a single, runnable example. Below we model a tiny bKash-style wallet table. Click Run — the DBMS creates the table, refuses to insert a negative balance (integrity), and answers a query in milliseconds.

wallet.sql
-- Show every wallet, richest first
SELECT owner, msisdn, balance
FROM wallet
ORDER BY balance DESC;

And here is what happens if a buggy program tries to set a negative balance — the DBMS refuses, protecting the business from a class of bugs that no CSV ever could.

integrity.sql
-- Try to overdraw — DBMS will reject it
UPDATE wallet
SET balance = balance - 5000
WHERE msisdn = '01711000001';

SELECT * FROM wallet;

5. Where Databases Live in Bangladesh (আপনার চারপাশে কোথায়)

Almost every digital service you trust runs on at least one — usually many — databases. Here are real, concrete examples from Bangladesh that you interact with every week:

bKash & Nagad
প্রতিটি send-money, cash-in, merchant payment একটি database transaction।
Pathao & Uber
রাইড, রাইডারের লোকেশন, ভাড়ার হিসাব সব database-এ।
Daraz & Chaldal
প্রোডাক্ট, অর্ডার, ডেলিভারি ট্র্যাকিং — সব relational table।
NID Server
১৩+ কোটি নাগরিকের তথ্য, যা পুলিশ ও ব্যাংক verify করে।
Education Boards
SSC/HSC ফলাফল, প্রতিটি শিক্ষার্থীর roll, GPA, subject।
Banks & BACH
প্রতিটি account, deposit, EFT — সবই ACID-compliant DB-তে।
Hospitals (Shasthya Batayan)
রোগীর রেকর্ড, prescription, vaccine database।
Library Systems
BUET/DU-র library catalog, issue/return ট্র্যাকিং।

Even the small computer-shop in your area uses a database — usually behind a Tally or POS app — to track inventory and bills. Once you see databases this way, you stop seeing apps and start seeing tables.

6. Who Works With Databases? — Roles & Career Paths

"DBMS" is not just one job. Around any non-trivial database, three different roles cooperate. Here is how companies in Dhaka actually structure their data teams:

RoleDaily Jobবাংলায়
Database Administrator (DBA)Installs and tunes the DBMS, runs backups, sets up replication, monitors slow queries, manages users and permissions.DBMS install, tuning, backup, replication ও permission সামলান। Server-পর্যায়ের কাজ।
Application DeveloperWrites the SQL inside the app — every SELECT, every INSERT — and designs the schema.App-এর ভেতরে SQL লেখেন; প্রতিটি screen-এর schema design করেন।
Data Analyst / BI EngineerWrites complex read-only queries to find patterns, builds dashboards (Power BI, Metabase), reports trends to management.Read-only জটিল query লিখে dashboard বানান, ম্যানেজমেন্টকে ট্রেন্ড দেখান।
Data EngineerBuilds ETL pipelines that move data between operational DBs and warehouses (BigQuery, Snowflake).Operational DB থেকে warehouse-এ ডেটা নিয়ে যাওয়ার pipeline বানান।
Backend EngineerGlues the DBMS to the API. 70% of their bugs are SQL bugs.API ও DBMS-এর মাঝে সেতু। বাগের বেশিরভাগই SQL-এ।
Database শেখা মানে শুধু DBA হওয়া নয়। Backend engineer, data analyst, data engineer, এমনকি product manager — সবার জন্যই SQL একটি base skill। বাংলাদেশে fresher backend দের প্রায় 70% interview-এই SQL question থাকে।

✅ Why Learn DBMS & SQL

  • Used by every backend job in Bangladesh.
  • SQL has not changed much in 30 years — your knowledge ages well.
  • Excellent freelance market (US/UK clients).
  • Foundation for data science, ML, and analytics careers.

⚠️ Common Beginner Mistakes

  • Memorising syntax without learning the relational model.
  • Skipping JOINs and GROUP BY — that's where the real work is.
  • Ignoring transactions — many bugs are concurrency bugs.
  • Believing NoSQL "replaced" SQL. It did not.

7. Quick Glossary (শব্দকোষ)

TermMeaningবাংলায়
DatabaseAn organised collection of related data.সম্পর্কযুক্ত ডেটার একটি সংগঠিত সংগ্রহ।
DBMSThe software that creates and manages databases (SQLite, PostgreSQL, MySQL).Database তৈরি ও পরিচালনার software।
SQLThe language we use to talk to a relational DBMS.Relational DBMS-এর সাথে কথা বলার ভাষা।
TableA grid of rows and columns; the unit of relational storage.Row ও column-এর গ্রিড।
Row / TupleOne record — one student, one transaction, one order.একটি রেকর্ড।
Column / AttributeOne named property — name, balance, msisdn.একটি নামকৃত বৈশিষ্ট্য।
SchemaThe blueprint — which tables exist, which columns, which types.Database-এর ব্লুপ্রিন্ট।
QueryA single SQL statement asking for or changing data.একটি SQL বাক্য, যা ডেটা চাওয়া বা পরিবর্তন করে।

8. Practice Problems

Each problem has a Show Answer button. Try first, then check. Several answers contain runnable SQL — click Run to see the result.

প্রতিটি প্রশ্নে Show Answer বাটন আছে। আগে নিজে চেষ্টা করুন, তারপর মিলিয়ে নিন। অনেক উত্তরে runnable SQL আছে — Run চেপে ফলাফল দেখতে পারবেন।
  1. Give one real example from your daily life where data becomes information only after context is added.
    আপনার দৈনন্দিন জীবন থেকে এমন একটি উদাহরণ দিন যেখানে context যোগ করার পরই data → information হয়ে ওঠে।
    ✨ Show Answer (উত্তর দেখুন)

    Sample answer: The number 13.5 alone is just data. The phrase "13.5 km from Mirpur 10 to Motijheel" is information. The conclusion "I should leave 45 minutes early during rush hour" is knowledge.

    শুধু ১৩.৫ হলো data। "মিরপুর-১০ থেকে মতিঝিল ১৩.৫ কিমি" হলো information। "জ্যামের সময় ৪৫ মিনিট আগে বের হতে হবে" — এটি knowledge।

  2. List the three biggest problems with storing a country's NID data in a single CSV file.
    পুরো দেশের NID ডেটা একটি মাত্র CSV ফাইলে রাখলে সবচেয়ে বড় তিনটি সমস্যা কী হবে?
    ✨ Show Answer (উত্তর দেখুন)

    Answer: (1) Concurrency — when 10 government offices update at once, writes overwrite each other. (2) Integrity — nothing prevents two citizens from sharing the same NID. (3) Performance — searching 13 crore rows linearly is unusable; a DBMS uses indexes.

    (১) Concurrency — দশটি অফিস একসাথে আপডেট করলে লেখা হারাবে। (২) Integrity — দুজনের একই NID হওয়া আটকানো যাবে না। (৩) Performance — ১৩ কোটি row লাইন ধরে খুঁজলে অচল; DBMS index ব্যবহার করে।

  3. Create a table student with columns roll, name, and cgpa for three students from your class. Then list everyone with CGPA above 3.5.
    তিনজন শিক্ষার্থীর জন্য student টেবিল বানান (roll, name, cgpa) এবং CGPA ৩.৫-এর বেশি সবাইকে দেখান।
    ✨ Show Answer (উত্তর দেখুন)
    ans3.sql
    SELECT roll, name, cgpa
    FROM student
    WHERE cgpa > 3.5
    ORDER BY cgpa DESC;
  4. Build a tiny bkash_txn table with a few transactions and list the total amount sent.
    কয়েকটি লেনদেন নিয়ে bkash_txn টেবিল বানান এবং মোট পাঠানো টাকার যোগফল বের করুন।
    ✨ Show Answer (উত্তর দেখুন)
    ans4.sql
    SELECT SUM(amount) AS total_sent,
           COUNT(*) AS txn_count
    FROM bkash_txn;
  5. Explain in your own words: what is the difference between a "database" and a "DBMS"?
    নিজের ভাষায় বলুন: "database" এবং "DBMS"-এর মধ্যে পার্থক্য কী?
    ✨ Show Answer (উত্তর দেখুন)

    Answer: A database is the data itself — the stored facts, like the tables of bKash transactions. A DBMS is the program (SQLite, PostgreSQL, MySQL) that creates, queries, and protects that data. The database is the book; the DBMS is the librarian.

    Database মানে ডেটা নিজেই — সংরক্ষিত তথ্য, যেমন bKash লেনদেনের টেবিল। DBMS হলো সেই software (SQLite, PostgreSQL, MySQL) যা ডেটা তৈরি, query এবং সুরক্ষা করে। Database হলো বই; DBMS হলো লাইব্রেরিয়ান।

  6. Try to insert a transaction with a negative amount into the table below. What happens, and why?
    নিচের টেবিলে ঋণাত্মক amount-এর একটি লেনদেন insert করার চেষ্টা করুন। কী ঘটে এবং কেন?
    ✨ Show Answer (উত্তর দেখুন)
    ans6.sql
    -- The CHECK constraint will reject this row
    INSERT INTO bkash_txn
    VALUES (99, '01711000001', '01812000002', -100);

    DBMS-এর CHECK constraint লঙ্ঘিত হয় বলে row reject হয় — এটি integrity-এর জীবন্ত উদাহরণ। CSV হলে এমন কোনো রক্ষণ থাকত না।

Summary — Module 01

Data is raw facts; information is data with context. A database stores data, and a DBMS manages the database. Plain text and CSV files break the moment we need concurrency, integrity, durability, or fast querying — and a DBMS provides all four out of the box. From bKash to NID to your university's result portal, every serious system in Bangladesh depends on a database. Understanding why is the first step in this 60-module journey.

Data মানে কাঁচা তথ্য, information মানে context-যুক্ত data। Database তথ্য রাখে, DBMS তা পরিচালনা করে। CSV ফাইল ছোট কাজে চললেও concurrency, integrity, durability ও দ্রুত query — এই চারটির কোনোটিতেই সে দাঁড়াতে পারে না; আর সব কিছুই একটি ভালো DBMS বিনামূল্যে দেয়। bKash থেকে NID — বাংলাদেশের প্রতিটি গুরুত্বপূর্ণ সিস্টেম database-নির্ভর।

Next Module → File Systems vs DBMS — কেন আমরা flat file ছেড়ে database বেছে নিলাম, তার ঐতিহাসিক কাহিনী।