--:-- --
↓ Scroll for more

Unit 5.5

Database Management Systems (DBMS) Explained

IT 231: IT and Application

Learning Objectives 🎯

By the end of this session, you will be able to:

  • ✅ Define a Database Management System (DBMS) and its purpose.
  • ✅ Describe the major functions of a DBMS.
  • ✅ Understand the role of SQL as the language of databases.
  • ✅ Provide examples of popular DBMS.

What is a DBMS?

A Database Management System (DBMS) is a software program that enables users to create, maintain, and control access to a database.

Think of it like a librarian for a huge library:

  • The Library is the Database (stores information).
  • The Books are the Data.
  • The Librarian is the DBMS (manages, organizes, and controls access).

The DBMS: Your Data Gatekeeper

It acts as an interface between users/applications and the physical database.

Users & Applications

e.g., Website, Mobile App, Analyst

➡️ DBMS ⬅️

(The Manager)

Database

e.g., Tables, Records, Files

The DBMS ensures data is consistently organized and easily accessible, preventing chaos.

Major Functions of a DBMS ⚡

A DBMS handles several critical tasks to manage the database effectively:

  • 📜 Data Definition: Defining the database structure.
  • ✍️ Data Manipulation: Interacting with the data.
  • 🔐 Data Security & Control: Protecting the data.
  • 🔄 Concurrency Control: Managing simultaneous access.
  • 💾 Backup & Recovery: Ensuring data safety.

Function 1: Data Definition (The Blueprint) 📜

The DBMS uses a Data Definition Language (DDL) to build the database's structure.

DDL in Action

This is how an administrator defines the "rules" for the data.

CREATE TABLE Students (
  StudentID INT PRIMARY KEY,
  FirstName VARCHAR(50),
  LastName VARCHAR(50),
  EnrollmentDate DATE
);

DDL is used to create tables, define fields, and set constraints.

Function 2: Data Manipulation (The Tools) ✍️

A Data Manipulation Language (DML) allows users to work with the data.

For relational databases, the standard DML is SQL (Structured Query Language).

Core DML Operations:

  • Retrieve (Read)
  • Insert (Create)
  • Update (Modify)
  • Delete (Remove)

Simple SQL Examples:

-- Retrieve data
SELECT * FROM Students;

-- Insert a new record
INSERT INTO Students VALUES (...);

-- Delete a record
DELETE FROM Students WHERE StudentID=101;

Functions 3 & 4: Control & Consistency

🔐 Data Security & Control

The DBMS acts as a security guard.

  • Prevents unauthorized access.
  • Administrators can grant or revoke permissions.
  • Example: A student can view their own grades, but a registrar can view all grades.

🔄 Concurrency Control

Ensures smooth operation in multi-user environments.

  • Prevents conflicts when multiple users try to change the same data at the same time.
  • Imagine two bank tellers trying to update the same account balance simultaneously. The DBMS prevents this from causing errors!

Function 5: Backup & Recovery (The Safety Net) 💾

Protects data from loss due to system failures, errors, or disasters.

Backup

The DBMS provides tools to create periodic copies (backups) of the database.

Recovery

If the system crashes, the DBMS can use the backups and transaction logs to restore the database to a consistent state.

This function is absolutely critical for business continuity.

Popular DBMS in the Wild 📊

Different systems are chosen based on cost, scale, and features.

Open-Source

  • MySQL: The world's most popular open-source relational DBMS. Powers much of the web (WordPress, Facebook).
  • PostgreSQL: A powerful, advanced open-source object-relational DBMS known for its reliability and feature set.

Commercial

  • Microsoft SQL Server: A popular and comprehensive commercial DBMS from Microsoft, widely used in enterprise environments.
  • Oracle Database: A leading commercial relational DBMS from Oracle, known for its high performance and scalability in large corporations.

DBMS in Action: A Nepali Context

Scenario: A Digital Wallet like eSewa or Khalti

How does a DBMS (like PostgreSQL or MySQL) power these services?

  • Data Definition: Defines tables for `Users`, `Transactions`, `Merchants`, and `BankAccounts`.
  • Data Manipulation: When you send money, an `INSERT` statement adds a record to the `Transactions` table, and `UPDATE` statements change the balances in user accounts.
  • Security: Manages your login credentials and ensures you can only access your own transaction history.
  • Concurrency: Safely processes thousands of payments and transfers simultaneously across Nepal without data corruption.
  • Backup: Regularly backs up all transaction data to prevent loss in case of a server failure.

Summary & Key Takeaways

  • A DBMS is the essential software used to create, manage, and control a database.
  • Its key functions are Data Definition (DDL), Data Manipulation (DML), Security, Concurrency Control, and Backup/Recovery.
  • SQL is the standard language for interacting with relational databases, covering both DDL and DML operations.
  • Popular DBMS include open-source options like MySQL and PostgreSQL, and commercial systems like MS SQL Server and Oracle.

Thank You!

Any questions?

Next Up: Introduction to SQL

Back to Start | Course Home