0% found this document useful (0 votes)
5 views

DBMS

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

DBMS

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

DATABASE MANAGEMENT SYSTEM (DBMS)

Class 10 IT (402)
Table of Contents:-
1.​ Introduction to DBMS
2.​ Characteristics of DBMS
3.​ Advantages of DBMS
4.​ Types of DBMS
5.​ Database Concepts
6.​ SQL Commands and Classification
○​ DDL (Data Definition Language)
○​ DML (Data Manipulation Language)
○​ DCL (Data Control Language)
7.​ Steps to Create a Database
8.​ Practical Examples
9.​ Database Design with Example
10.​ Real-life Applications of DBMS
11.​Conclusion

1. Introduction to DBMS
A Database Management System (DBMS) is a software application
designed to define, manipulate, retrieve, and manage data in a database. A
database is a collection of organized information stored electronically. The
DBMS ensures data integrity, security, and efficiency in managing large
amounts of data.

Why Use a DBMS?


1.​ To store data in an organized manner.
2.​ To avoid redundant or duplicate data.
3.​ To provide secure access to authorized users.

Example:​
In a hospital, DBMS is used to store patient details, such as their medical
history, current treatments, and billing records.
2. Characteristics of DBMS

●​ Data Abstraction: Hides complexity from users by showing only the


required details.
●​ Data Consistency: Maintains uniform data across all records.
●​ Concurrency Control: Allows multiple users to access data
simultaneously.
●​ Data Backup and Recovery: Ensures data is safe during system
failures.
●​ Support for Transactions: Manages multiple operations as a single
logical unit.

3. Advantages of DBMS

3.1. Data Redundancy Elimination

●​ Problem Without DBMS: If a student’s address is stored in multiple


tables, updating it in one table doesn’t reflect in others.
●​ Solution with DBMS: Data normalization eliminates redundancy.

3.2. Data Integrity


Ensures that only valid data is stored.​
Example: If "Age" is a field, it will accept only valid numerical values.

3.3. Security
Restricts unauthorized users from accessing sensitive data.​
Example: An employee database may allow only HR staff to access salary
details.

3.4. Efficient Query Processing


Retrieves data quickly using SQL queries.​
Example:
SELECT * FROM Employees WHERE Department = 'Finance';
3.5. Scalability
Handles growing amounts of data efficiently.

4. Types of DBMS

4.1. Relational DBMS (RDBMS)


●​ Stores data in tables with rows and columns.
●​ Example: MySQL, PostgreSQL.

SQL Example for RDBMS:​


CREATE TABLE Students (
ID INT PRIMARY KEY,
Name VARCHAR(50),
Age INT
);

●​

4.2. Hierarchical DBMS


●​ Data is stored in a tree-like structure.
●​ Example: IBM IMS.
●​ Use Case: File systems, organizational charts.

4.3. Network DBMS


●​ Organizes data as a graph where multiple records can be linked.
●​ Example: Integrated Data Store (IDS).

4.4. Object-oriented DBMS


●​ Combines object-oriented programming with database systems.
●​ Example: ObjectDB, DB4O.

5. Database Concepts
5.1. Data
Raw facts stored in a database.​
Example: A student’s name, marks, and roll number.

5.2. Fields and Records

●​ Field: A single column in a table. Example: "Name" in a Students table.


●​ Record: A row in a table. Example: Details of one student.

5.3. Table
A collection of rows (records) and columns (fields).​
Example Table:

ID Name Age Grade


1 John 15 A

5.4. Primary Key


A unique identifier for each record.​
Example: Student ID.

6. SQL Commands and Classification

6.1. DDL (Data Definition Language)


Commands to define database structures:

CREATE: Creates a new table.​



CREATE TABLE Books (
BookID INT PRIMARY KEY,
Title VARCHAR(100),
Author VARCHAR(50)
);
●​ ALTER: Modifies an existing table.​

ALTER TABLE Books ADD PublishedYear INT;

●​ DROP: Deletes a table.​



DROP TABLE Books;

6.2. DML (Data Manipulation Language)


Commands to manipulate data:

●​ INSERT: Adds data to a table.​



INSERT INTO Books (BookID, Title, Author, PublishedYear)
VALUES (1, 'The Alchemist', 'Paulo Coelho', 1988);

●​ SELECT: Retrieves data.​



SELECT * FROM Books WHERE Author = 'Paulo Coelho';

●​ UPDATE: Modifies existing data.​



UPDATE Books SET Title = 'The Pilgrimage' WHERE BookID = 1;

●​ DELETE: Removes data.​



DELETE FROM Books WHERE BookID = 1;

6.3. DCL (Data Control Language)


Commands to control database access:
●​ GRANT: Grants user permissions.​

GRANT SELECT ON Books TO User1;

●​ REVOKE: Removes user permissions.​



REVOKE SELECT ON Books FROM User1;

7. Steps to Create a Database

1.​ Open DBMS Software: Launch tools like MySQL or Microsoft


Access.
2.​ Create a Database:​
CREATE DATABASE SchoolDB;
3.​ Use the Database:​
USE SchoolDB;
4.​ Create Tables:
CREATE TABLE Students (
ID INT PRIMARY KEY,
Name VARCHAR(50),
Age INT
);
5.​ Insert Data into Tables:​
INSERT INTO Students (ID, Name, Age) VALUES (1, 'Alice', 14);

8. Practical Examples

Example 1: Table Creation


CREATE TABLE Employees (
EmployeeID INT PRIMARY KEY,
Name VARCHAR(100),
Department VARCHAR(50),
Salary INT
);

Example 2: Data Retrieval


SELECT Name, Department FROM Employees WHERE Salary > 40000;

Example 3: Updating Data


UPDATE Employees SET Department = 'HR' WHERE EmployeeID = 101;

9. Database Design with Example

Scenario: School Database

1.​Tables:​

○​ Students
○​ Teachers
○​ Classes
2.​Relationships:​

○​ One student attends one class.


○​ One teacher teaches multiple classes.
3.​ Schema Example:​
Students Table​

StudentID Name ClassID


4.​ ​
Teachers Table​

TeacherID Name Subject

10. Real-life Applications of DBMS


1.​ Banking Systems: Manage accounts and transactions.
2.​ E-commerce Platforms: Store product and customer data.
3.​ Education Systems: Handle student and staff information.
4.​ Healthcare Systems: Manage patient records.

11. Conclusion
A DBMS simplifies the management of data while ensuring security, accuracy,
and reliability. Its versatility makes it a fundamental tool in almost every
industry.

You might also like