Skip to contentমূল লেখায় যান

Topic 14 · Courseটপিক 14 · Course

Databases and DBMS

A paper filing cabinet keeps your records, and a clerk finds, adds, and changes them for you. A database is the cabinet. The database management system (DBMS) is the clerk that every app must ask.

5 min read5 মিনিটে পড়া যায় · 7 sections7টি সেকশন · 8 sources8টি সোর্স · updated Nov 2026আপডেট: Nov 2026

In plain words

A database is data that is kept in an organized way. It can be as small as a shopping list or as large as the information of a whole company network Source 1সোর্স 1.

To add, read, and process that data, you need a database management system (DBMS), such as MySQL Server Source 1সোর্স 1. DBMSs are central in computing. They run as separate tools or as parts of other applications Source 1সোর্স 1.

MySQL and PostgreSQL are both relational systems. They keep data in tables, not in one big pile Source 1সোর্স 1 Source 2সোর্স 2. A table has a name and holds rows. All rows of a table share the same named columns, and each column has one data type Source 2সোর্স 2. SQL does not promise any order of rows, unless you ask for a sort Source 2সোর্স 2. Tables are grouped into databases Source 2সোর্স 2.

সহজ English

A database is data that is kept in an organized way. It can be small, like a shopping list. It can be large, like the information of a whole company network Source 1সোর্স 1.

To add, read, and process the data, you need a database management system (DBMS). MySQL Server is one example Source 1সোর্স 1. A DBMS runs as a separate tool or as a part of another application Source 1সোর্স 1.

MySQL and PostgreSQL are relational systems. They keep data in tables, not in one big pile Source 1সোর্স 1 Source 2সোর্স 2. A table has a name and holds rows. All rows of a table have the same named columns. Each column has one data type Source 2সোর্স 2. SQL does not promise any order of rows, unless you ask for a sort Source 2সোর্স 2. Tables are grouped into databases Source 2সোর্স 2.

বাংলা ব্যাখ্যা

ডেটাবেস হলো সাজানো-গোছানো ভাবে রাখা ডেটা। এটা বাজারের তালিকার মতো ছোট হতে পারে, আবার পুরো কোম্পানি নেটওয়ার্কের তথ্যের মতো বড়ও হতে পারে Source 1সোর্স 1।

ডেটা যোগ করতে, পড়তে ও প্রসেস করতে একটা ডেটাবেস ম্যানেজমেন্ট সিস্টেম (DBMS) লাগে, যেমন MySQL Server Source 1সোর্স 1। DBMS কম্পিউটিংয়ের কেন্দ্রীয় অংশ। এগুলো আলাদা টুল হিসেবে চলে, অথবা অন্য অ্যাপ্লিকেশনের অংশ হিসেবে চলে Source 1সোর্স 1।

MySQL আর PostgreSQL দুটোই রিলেশনাল (relational) সিস্টেম। এগুলো ডেটা রাখে টেবিলে, একটা বড় স্তূপে নয় Source 1সোর্স 1 Source 2সোর্স 2। একটা টেবিলের একটা নাম থাকে এবং তাতে রো (row) থাকে। একটা টেবিলের সব রো-তে একই নামের কলাম (column) থাকে, আর প্রতিটা কলামের একটাই ডেটা টাইপ Source 2সোর্স 2। আপনি সর্ট করতে না বললে SQL রো-এর কোনো ক্রমের নিশ্চয়তা দেয় না Source 2সোর্স 2। টেবিলগুলো ডেটাবেসে গ্রুপ করা থাকে Source 2সোর্স 2।

When you need it

Use a DBMS when an app must keep data after it closes and let many users share it. The sources show these jobs of a DBMS:

JobWhat the sources say
Storage and accessThe DBMS lets you add, access, and process the data Source 1সোর্স 1
QueriesSQL is the most common standard language to access databases Source 1সোর্স 1
RulesThe database enforces the rules that you set for the data Source 1সোর্স 1
ConcurrencyThe server handles many connections at the same time Source 3সোর্স 3
DurabilityA transaction is logged to permanent storage before it is reported complete Source 4সোর্স 4
Access controlIn PostgreSQL, for most kinds of objects, only the owner (or a superuser) can use a new object at first. Other roles need granted privileges Source 7সোর্স 7

সহজ English

Use a DBMS when an app must keep data after it closes and let many users share it. A DBMS does these jobs:

বাংলা ব্যাখ্যা

একটা অ্যাপ বন্ধ হওয়ার পরও ডেটা রাখতে এবং অনেক ইউজারকে তা শেয়ার করতে দিতে হলে DBMS ব্যবহার করুন। সোর্সগুলো DBMS-এর এই কাজগুলো দেখায়:

  • স্টোরেজ ও অ্যাক্সেস: DBMS আপনাকে ডেটা যোগ করতে, অ্যাক্সেস করতে ও প্রসেস করতে দেয় Source 1সোর্স 1।
  • কুয়েরি (query): ডেটাবেসে অ্যাক্সেস করার সবচেয়ে প্রচলিত স্ট্যান্ডার্ড ভাষা হলো SQL Source 1সোর্স 1।
  • নিয়ম: ডেটার জন্য আপনি যে নিয়ম ঠিক করেন, ডেটাবেস তা মানতে বাধ্য করে Source 1সোর্স 1।
  • কনকারেন্সি (concurrency): সার্ভার একই সময়ে অনেক কানেকশন সামলায় Source 3সোর্স 3।
  • ডিউরেবিলিটি (durability): একটা ট্রানজেকশন সম্পন্ন হয়েছে বলে জানানোর আগে সেটা স্থায়ী স্টোরেজে লগ করা হয় Source 4সোর্স 4।
  • অ্যাক্সেস কন্ট্রোল: PostgreSQL-এ বেশিরভাগ ধরনের অবজেক্টের ক্ষেত্রে শুরুতে শুধু ওনার (owner) বা সুপারইউজার নতুন অবজেক্ট ব্যবহার করতে পারে। অন্য রোলদের (role) প্রিভিলেজ (privilege) দিতে হয় Source 7সোর্স 7।

How it works

Client and server. PostgreSQL uses a client/server model. The server process manages the database files, accepts connections, and does the database actions for the clients Source 3সোর্স 3. A client can be a web server that reads the database to build web pages Source 3সোর্স 3. Client and server can run on different hosts and talk over a TCP/IP network Source 3সোর্স 3. MySQL is also a client/server system Source 1সোর্স 1. PostgreSQL starts a new process for each connection Source 3সোর্স 3.

Queries. An app can send SQL directly, put SQL statements in its code, or use an API that hides the SQL Source 1সোর্স 1. PostgreSQL follows much of the SQL standard Source 8সোর্স 8.

Rules. You can set rules between data fields, such as one-to-many, unique, or required. The database enforces them. The manual says that, with a good design, the app is safe from bad data: data that is inconsistent, duplicated, orphaned, old, or missing Source 1সোর্স 1. PostgreSQL lists foreign keys and triggers among its features Source 8সোর্স 8.

Concurrency. A transaction bundles several steps into one all-or-nothing operation. Other transactions do not see the middle states Source 4সোর্স 4. PostgreSQL uses MVCC (multiversion concurrency control): each statement sees a snapshot of the data, and reading never blocks writing Source 5সোর্স 5.

Durability. A transactional database logs the updates of a transaction to permanent storage (disk) before it reports the transaction complete Source 4সোর্স 4. PostgreSQL does this with a write-ahead log (WAL). It logs a change before it writes the change to the data files. After a crash, it can replay the log Source 6সোর্স 6.

Access control. In PostgreSQL, a new object has an owner. For most objects, only the owner (or a superuser) can use it at first. The owner must grant privileges, such as SELECT or INSERT, to other roles Source 7সোর্স 7.

সহজ English

Client and server. PostgreSQL uses a client/server model. The server process manages the database files. It accepts connections and does the database actions for the clients Source 3সোর্স 3. A client can be a web server that reads the database to build web pages Source 3সোর্স 3. Client and server can run on different hosts. They talk over a TCP/IP network Source 3সোর্স 3. MySQL is also a client/server system Source 1সোর্স 1. PostgreSQL starts a new process for each connection Source 3সোর্স 3.

Queries. An app can send SQL directly. It can put SQL statements in its code. It can also use an API that hides the SQL Source 1সোর্স 1. PostgreSQL follows much of the SQL standard Source 8সোর্স 8.

Rules. You can set rules between data fields, such as one-to-many, unique, or required. The database enforces them. The manual says that, with a good design, the app is safe from bad data. Bad data is data that is inconsistent, duplicated, orphaned, old, or missing Source 1সোর্স 1. PostgreSQL lists foreign keys and triggers among its features Source 8সোর্স 8.

Concurrency. A transaction bundles several steps into one all-or-nothing operation. Other transactions do not see the middle states Source 4সোর্স 4. PostgreSQL uses MVCC (multiversion concurrency control). Each statement sees a snapshot of the data. Reading never blocks writing Source 5সোর্স 5.

Durability. A transactional database writes the updates of a transaction to a log on permanent storage (disk) before it reports the transaction complete Source 4সোর্স 4. PostgreSQL does this with a write-ahead log (WAL). It logs a change before it writes the change to the data files. After a crash, it can replay the log Source 6সোর্স 6.

Access control. In PostgreSQL, a new object has an owner. For most objects, only the owner (or a superuser) can use it at first. The owner must grant privileges, such as SELECT or INSERT, to other roles Source 7সোর্স 7.

বাংলা ব্যাখ্যা

ক্লায়েন্ট ও সার্ভার। PostgreSQL ক্লায়েন্ট/সার্ভার মডেল ব্যবহার করে। সার্ভার প্রসেস ডেটাবেস ফাইল পরিচালনা করে, কানেকশন গ্রহণ করে এবং ক্লায়েন্টদের হয়ে ডেটাবেসের কাজ করে Source 3সোর্স 3। ক্লায়েন্ট হতে পারে এমন একটা ওয়েব সার্ভার, যে ওয়েব পেজ বানাতে ডেটাবেস পড়ে Source 3সোর্স 3। ক্লায়েন্ট ও সার্ভার আলাদা হোস্টে চলতে পারে এবং TCP/IP নেটওয়ার্ক দিয়ে কথা বলে Source 3সোর্স 3। MySQL-ও ক্লায়েন্ট/সার্ভার সিস্টেম Source 1সোর্স 1। PostgreSQL প্রতিটা কানেকশনের জন্য একটা নতুন প্রসেস শুরু করে Source 3সোর্স 3।

কুয়েরি। একটা অ্যাপ সরাসরি SQL পাঠাতে পারে, নিজের কোডে SQL স্টেটমেন্ট রাখতে পারে, অথবা এমন API ব্যবহার করতে পারে যা SQL লুকিয়ে রাখে Source 1সোর্স 1। PostgreSQL SQL স্ট্যান্ডার্ডের অনেকটা অনুসরণ করে Source 8সোর্স 8।

নিয়ম। আপনি ডেটা ফিল্ডগুলোর মধ্যে নিয়ম ঠিক করতে পারেন, যেমন one-to-many, unique বা required। ডেটাবেস সেগুলো মানতে বাধ্য করে। ম্যানুয়াল বলে, ভালো ডিজাইন থাকলে অ্যাপ খারাপ ডেটা থেকে নিরাপদ থাকে। খারাপ ডেটা মানে অসঙ্গত (inconsistent), ডুপ্লিকেট, অরফান (orphaned), পুরোনো বা হারানো ডেটা Source 1সোর্স 1। PostgreSQL তার ফিচারের তালিকায় ফরেন কী (foreign key) ও ট্রিগার (trigger) রেখেছে Source 8সোর্স 8।

কনকারেন্সি। একটা ট্রানজেকশন কয়েকটা ধাপকে একটা all-or-nothing অপারেশনে বাঁধে, অর্থাৎ হয় সব ধাপ হয়, নয়তো কোনোটাই হয় না। অন্য ট্রানজেকশন মাঝের অবস্থাগুলো দেখে না Source 4সোর্স 4। PostgreSQL MVCC (multiversion concurrency control) ব্যবহার করে: প্রতিটা স্টেটমেন্ট ডেটার একটা স্ন্যাপশট (snapshot) দেখে, এবং পড়া কখনো লেখাকে আটকায় না Source 5সোর্স 5।

ডিউরেবিলিটি। ট্রানজেকশনাল ডেটাবেস একটা ট্রানজেকশন সম্পন্ন হয়েছে বলে জানানোর আগে তার আপডেটগুলো স্থায়ী স্টোরেজের (ডিস্ক) লগে লেখে Source 4সোর্স 4। PostgreSQL এটা করে write-ahead log (WAL) দিয়ে। এটা ডেটা ফাইলে লেখার আগে পরিবর্তন লগ করে। ক্র্যাশের পর এটা লগ আবার চালাতে পারে Source 6সোর্স 6।

অ্যাক্সেস কন্ট্রোল। PostgreSQL-এ নতুন অবজেক্টের একজন ওনার (owner) থাকে। বেশিরভাগ অবজেক্ট শুরুতে শুধু ওনার বা সুপারইউজার ব্যবহার করতে পারে। ওনারকে অন্য রোলদের SELECT বা INSERT-এর মতো প্রিভিলেজ দিতে হয় Source 7সোর্স 7।

A real-life example

A learning platform keeps students and enrolments. This example is the tutorial's own. The web app is the client. The DBMS holds a students table and an enrolments table.

A student clicks "Enrol". The app sends one transaction to the DBMS: add a row to enrolments and lower the free seats of the course. If the server fails between the two steps, a transaction should leave neither step done, because it is all-or-nothing Source 4সোর্স 4. If a student lists courses at the same moment, they should not see half of the change Source 4সোর্স 4. The app does not need its own code for this. The DBMS does it.

সহজ English

A learning platform keeps students and enrolments. This example is the tutorial's own. The web app is the client. The DBMS holds a students table and an enrolments table.

A student clicks "Enrol". The app sends one transaction to the DBMS. The transaction adds a row to enrolments and lowers the free seats of the course. If the server fails between the two steps, a transaction should leave neither step done. This is because it is all-or-nothing Source 4সোর্স 4. If a student lists courses at the same moment, they should not see half of the change Source 4সোর্স 4. The app does not need its own code for this. The DBMS does it.

বাংলা ব্যাখ্যা

একটা লার্নিং প্ল্যাটফর্ম স্টুডেন্ট ও এনরোলমেন্ট (enrolment) রাখে। এই উদাহরণ টিউটোরিয়ালের নিজের। ওয়েব অ্যাপ হলো ক্লায়েন্ট। DBMS-এ একটা students টেবিল ও একটা enrolments টেবিল আছে।

একজন স্টুডেন্ট "Enrol" চাপে। অ্যাপ DBMS-কে একটা ট্রানজেকশন পাঠায়: enrolments-এ একটা রো যোগ করা এবং কোর্সের ফাঁকা সিট কমানো। দুই ধাপের মাঝখানে সার্ভার ফেইল করলে ট্রানজেকশনের উচিত কোনো ধাপই সম্পন্ন না রাখা, কারণ এটা হয় সব ধাপ হয়, নয়তো কোনোটাই হয় না (all-or-nothing) Source 4সোর্স 4। একই মুহূর্তে একজন স্টুডেন্ট কোর্সের তালিকা দেখলে ওই পরিবর্তনের অর্ধেক দেখা উচিত নয় Source 4সোর্স 4। এর জন্য অ্যাপের নিজের কোড লাগে না। DBMS-ই এটা করে।

Common mistakes

  • Mixing up the two words. The database is the data. The DBMS is the software that manages it Source 1সোর্স 1.
  • Counting on row order. SQL gives no order unless you sort Source 2সোর্স 2.
  • Testing only the app. The app and the DBMS are two parts that can run on different hosts Source 3সোর্স 3. A failure can come from the link between them (this point is the tutorial's own).
  • Giving every user full rights. Privileges let you give each role only the rights it needs. This advice is the tutorial's own.
  • Assuming all DBMSs behave the same. This page cites PostgreSQL and MySQL only. Check the manual of your DBMS.

সহজ English

  • Mixing up the two words. The database is the data. The DBMS is the software that manages it Source 1সোর্স 1.
  • Counting on row order. SQL gives no order unless you sort Source 2সোর্স 2.
  • Testing only the app. The app and the DBMS are two parts. They can run on different hosts Source 3সোর্স 3. A failure can come from the link between them (this point is the tutorial's own).
  • Giving every user full rights. Privileges let you give each role only the rights it needs. This advice is the tutorial's own.
  • Assuming all DBMSs behave the same. This page cites PostgreSQL and MySQL only. Check the manual of your DBMS.

বাংলা ব্যাখ্যা

  • দুটো শব্দ গুলিয়ে ফেলা। ডেটাবেস হলো ডেটা। DBMS হলো সেই সফটওয়্যার যা ডেটা পরিচালনা করে Source 1সোর্স 1।
  • রো-এর ক্রমের ওপর ভরসা করা। সর্ট না করলে SQL কোনো ক্রম দেয় না Source 2সোর্স 2।
  • শুধু অ্যাপ টেস্ট করা। অ্যাপ ও DBMS দুটো আলাদা অংশ। এগুলো আলাদা হোস্টে চলতে পারে Source 3সোর্স 3। দুটোর মধ্যের লিংক থেকেও ফেইলিউর আসতে পারে (এই কথাটা টিউটোরিয়ালের নিজের)।
  • সব ইউজারকে পূর্ণ অধিকার দেওয়া। প্রিভিলেজ দিয়ে প্রতিটা রোলকে শুধু তার দরকারি অধিকার দেওয়া যায়। এই পরামর্শ টিউটোরিয়ালের নিজের।
  • সব DBMS একই রকম আচরণ করে ধরে নেওয়া। এই পেজ শুধু PostgreSQL ও MySQL-এর সোর্স ব্যবহার করে। আপনার DBMS-এর ম্যানুয়াল দেখুন।

What a tester can check

Tutorial advice

These test ideas are the tutorial's own advice. They are not claims of the sources.

  • Know the DBMS. Ask which DBMS and which version the app uses. Read its manual for the rules that you test.
  • Rules. Try to save a duplicate, an empty required field, or a row that points to a missing parent. The database should refuse it.
  • All or nothing. Stop a multi-step action half way, for example with a forced error. Check that no partial data stays.
  • Two users. Run two sessions at the same time on the same record. Check what each one sees.
  • Restart. Save data, restart the database server, and check that the data is still there.
  • Roles. Log in as a low-rights role. Check that it cannot read or change what it should not.

সহজ English

These test ideas are the tutorial's own advice. They are not claims of the sources.

  • Know the DBMS. Ask which DBMS and which version the app uses. Read its manual for the rules that you test.
  • Rules. Try to save a duplicate, an empty required field, or a row that points to a missing parent. The database should refuse it.
  • All or nothing. Stop a multi-step action half way, for example with a forced error. Check that no partial data stays.
  • Two users. Run two sessions at the same time on the same record. Check what each one sees.
  • Restart. Save data, restart the database server, and check that the data is still there.
  • Roles. Log in as a low-rights role. Check that it cannot read or change what it should not.

বাংলা ব্যাখ্যা

এই টেস্টের ধারণাগুলো টিউটোরিয়ালের নিজের পরামর্শ। এগুলো সোর্সের দাবি নয়।

  • DBMS জানুন। অ্যাপ কোন DBMS ও কোন ভার্সন ব্যবহার করে তা জিজ্ঞেস করুন। যে নিয়ম টেস্ট করবেন তার জন্য সেই DBMS-এর ম্যানুয়াল পড়ুন।
  • নিয়ম। একটা ডুপ্লিকেট, একটা ফাঁকা required ফিল্ড, অথবা এমন একটা রো সেভ করার চেষ্টা করুন যা একটা অনুপস্থিত প্যারেন্টের (parent) দিকে নির্দেশ করে। ডেটাবেসের তা প্রত্যাখ্যান করা উচিত।
  • সব অথবা কিছুই না (all or nothing)। বহু-ধাপের একটা অ্যাকশন মাঝপথে থামান, যেমন জোর করে এরর ঘটিয়ে। দেখুন কোনো আংশিক ডেটা থেকে যায় না।
  • দুজন ইউজার। একই রেকর্ডে একই সময়ে দুটো সেশন চালান। প্রত্যেকে কী দেখে তা দেখুন।
  • রিস্টার্ট। ডেটা সেভ করুন, ডেটাবেস সার্ভার রিস্টার্ট করুন, এবং দেখুন ডেটা এখনও আছে।
  • রোল। কম অধিকারের একটা রোলে লগইন করুন। দেখুন সে যা পড়া বা বদলানো উচিত নয়, তা পারে না।

Key words

WordMeaning
DatabaseData kept in an organized way Source 1সোর্স 1
DBMSThe software you need to add, access, and process the data Source 1সোর্স 1
RelationalData is kept in separate tables Source 1সোর্স 1
TableA named set of rows with the same columns Source 2সোর্স 2
TransactionSeveral steps that act as one all-or-nothing operation Source 4সোর্স 4
MVCCEach statement sees a snapshot, so reading and writing do not block each other Source 5সোর্স 5
WALA log that is written before the data files, used to recover after a crash Source 6সোর্স 6
PrivilegeA right, such as SELECT, that the owner grants to a role Source 7সোর্স 7

Reels on this topicএই টপিকের রিলস

Short videos from other creators, picked for this topic. They are not part of this page's fact-checked text. Nothing loads from YouTube until you press Play.অন্য ক্রিয়েটরদের বানানো ছোট ভিডিও, এই টপিকের জন্য বাছাই করা। এগুলো এই পেজের ফ্যাক্ট-চেক করা লেখার অংশ নয়। চালান বাটন চাপার আগে YouTube থেকে কিছুই লোড হয় না।

  1. [1]
    1.2.1 What is MySQL?

    MySQL 8.4 Reference Manual · accessed 2026-10-22দেখা হয়েছে: 2026-10-22

  2. [2]
    2.2. Concepts

    PostgreSQL 18 Documentation (Tutorial) · accessed 2026-10-22দেখা হয়েছে: 2026-10-22

  3. [3]
    1.2. Architectural Fundamentals

    PostgreSQL 18 Documentation (Tutorial) · accessed 2026-10-22দেখা হয়েছে: 2026-10-22

  4. [4]
    3.4. Transactions

    PostgreSQL 18 Documentation (Tutorial) · accessed 2026-10-22দেখা হয়েছে: 2026-10-22

  5. [5]
    13.1. Introduction (Concurrency Control)

    PostgreSQL 18 Documentation · accessed 2026-10-22দেখা হয়েছে: 2026-10-22

  6. [6]
    28.3. Write-Ahead Logging (WAL)

    PostgreSQL 18 Documentation · accessed 2026-10-22দেখা হয়েছে: 2026-10-22

  7. [7]
    5.8. Privileges

    PostgreSQL 18 Documentation · accessed 2026-10-22দেখা হয়েছে: 2026-10-22

  8. [8]
    1. What Is PostgreSQL?

    PostgreSQL 18 Documentation · accessed 2026-10-22দেখা হয়েছে: 2026-10-22