DATABASE MANAGEMENT
SYSTEM
INTRODUCTION TO DBMS
A Database Management System (DBMS) is software
that allows users to store, retrieve, manage, and
manipulate data in a structured and organized way. It
acts as an interface between the user and the
database, ensuring data is easily accessible, consistent,
and secure.
Examples of DBMS Software:
• My SQL
• Microsoft Access
• SQ Lite
• Oracle
Advantages of DBMS:-
1. Data Storage and Retrieval: Stores large amounts of data and allows
efficient retrieval.
2. Data Organization: Organizes data into tables, rows, and columns for better
structure.
3. Data Security: Protects data from unauthorized access.
4. Data Integrity: Ensures accuracy and consistency of the data.
5. Concurrency Control: Allows multiple users to access data simultaneously
without conflicts.
Disadvantages of DBMS:-
1. Complexity: Requires specialized knowledge to design and maintain.
2. High Cost: Initial setup, licensing, and hardware can be expensive.
3. Performance Overhead: Complex operations may slow down performance
for large databases.
4. Hardware Dependence: Requires high-performance hardware for optimal
functioning.
5. Vulnerability to Attacks: Centralized data can be a target for cyber-attacks.
INTRODUCTION TO SQL
(STRUCTURED QUERY LANGUAGE)
SQL (Structured Query Language) is a standard programming
language used to communicate with and manage relational
databases. It allows users to perform various operations such as
storing, retrieving, updating, and deleting data.
Basic Types of SQL Commands:
1. DDL (Data Definition Language): For defining and managing
database structures.
2. DML (Data Manipulation Language): For managing data
within tables.
3. DCL (Data Control Language): For controlling access to data.
DDL
(Data Definition Language)
Data Definition Language (DDL) is a category of SQL commands
used to define, modify, and manage the structure and schema of a
database. It focuses on creating and altering the database objects such
as tables, indexes, schemas, and views. DDL commands are
responsible for setting up the blueprint of a database, ensuring that its
structure is optimized and well-organized to store data effectively.
Features of DDL
Focuses on database structure rather than data manipulation.
Changes made by DDL commands are automatically committed,
making them permanent.
Helps in defining relationships and constraints between tables.
Key DDL Commands
1. CREATE
2. ALTER
3. DROP
4. TRUNCATE
DML
(Data Manipulation Language)
Data Manipulation Language (DML) is a category of SQL
commands used to interact with and manipulate the data stored
in a database. It allows users to perform operations such as
inserting new records, retrieving specific data, updating existing
data, and deleting unnecessary records from tables
Features of DML
Data-Centric: Focuses on manipulating the actual data stored in
tables.
Flexibility: Allows filtering and working on specific data subsets
using conditions.
Non-Permanent Changes: Changes made by DML commands
can be rolled back until explicitly committed.
Key DML Commands
1. INSERT
2. SELECT
3. UPDATE
4. DELETE
DCL
(Data Control Language)
Data Control Language (DCL) is a subset of SQL that is used to
control access to data within a database. It allows database
administrators to grant or revoke permissions to users or roles,
ensuring that data is securely accessed and managed according to
organizational policies. DCL helps in implementing database security
and maintaining control over sensitive information.
Features of DCL
1. Security Management: Helps enforce user-level access control
to protect sensitive data.
2. Role-Based Access: Allows assigning different roles to users
with specific levels of permissions.
3. Granular Control: Provides detailed control over database
operations (e.g., granting permission to a single table or
operation).
Key DCL Commands
1. GRANT
2. REVOKE