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

Database Management Systems (DBMS)

A Database Management System (DBMS) is software that facilitates the storage, retrieval, management, and manipulation of data across various applications. The document covers key concepts including database architecture, data models, normalization, SQL, transactions, and security, highlighting the differences between SQL and NoSQL databases. DBMS is critical in sectors like banking, e-commerce, healthcare, and social media for efficient data management.

Uploaded by

Ahmet Yasir Kaya
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Database Management Systems (DBMS)

A Database Management System (DBMS) is software that facilitates the storage, retrieval, management, and manipulation of data across various applications. The document covers key concepts including database architecture, data models, normalization, SQL, transactions, and security, highlighting the differences between SQL and NoSQL databases. DBMS is critical in sectors like banking, e-commerce, healthcare, and social media for efficient data management.

Uploaded by

Ahmet Yasir Kaya
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Database Management Systems (DBMS)

1. Introduction
A Database Management System (DBMS) is software that enables users to store, retrieve,
manage, and manipulate data efficiently. Databases are essential in modern computing,
supporting applications in banking, e-commerce, healthcare, social media, and more. A
DBMS helps in organizing data, ensuring security, maintaining integrity, and enabling
concurrent access by multiple users.

This lecture note explores the fundamental concepts of DBMS, including database
architecture, data models, normalization, query languages, transactions, and security.

2. Basic Concepts of DBMS


2.1 What is a Database?

A database is a structured collection of data that allows efficient storage, retrieval, and
management. Unlike simple file systems, databases provide advanced mechanisms to handle
large volumes of data while ensuring security and consistency.

2.2 What is a DBMS?

A Database Management System (DBMS) is software that facilitates interaction with


databases. It provides tools for:

 Data Definition: Creating and modifying database structures.


 Data Manipulation: Inserting, updating, deleting, and querying data.
 Data Security & Integrity: Controlling access and maintaining consistency.
 Concurrency Control: Ensuring multiple users can access data simultaneously
without conflicts.

Popular DBMS software includes MySQL, PostgreSQL, Oracle, Microsoft SQL Server,
and MongoDB.

3. Database Architecture
DBMS architecture defines how data is stored, managed, and accessed. It can be classified
into:

3.1 1-Tier Architecture

 The database and application reside on the same machine.


 Suitable for small-scale applications.

3.2 2-Tier Architecture

 The application and database are separated.


 The application communicates directly with the database using queries.
 Example: Client-Server Model.

3.3 3-Tier Architecture

 Adds a middle layer (Application Server) between the client and database.
 Enhances security, scalability, and flexibility.
 Example: Web Applications (Front-end → Application Server → Database).

4. Data Models in DBMS


A data model defines how data is structured and related within a database.

4.1 Hierarchical Model

 Data is structured in a tree-like format (parent-child relationships).


 Example: IBM’s Information Management System (IMS).

4.2 Network Model

 Uses a graph structure to allow multiple parent-child relationships.


 Example: CODASYL DBMS.

4.3 Relational Model

 Data is stored in tables (relations) with rows (tuples) and columns (attributes).
 Uses keys (Primary Key, Foreign Key) to maintain relationships.
 Example: MySQL, PostgreSQL.

4.4 Object-Oriented Model

 Stores data as objects, similar to object-oriented programming.


 Example: ObjectDB, db4o.

4.5 NoSQL Databases

 Designed for large-scale, unstructured data.


 Includes document-based (MongoDB), key-value (Redis), and column-family
(Cassandra) databases.
5. Database Schema and Normalization
A database schema defines the logical structure of a database.

5.1 Types of Schemas

 Physical Schema: Defines how data is stored on disk.


 Logical Schema: Defines tables, relationships, constraints.
 View Schema: Defines how data is presented to users.

5.2 Database Normalization

Normalization organizes data to reduce redundancy and improve consistency.

Normalization Forms

 1st Normal Form (1NF): Eliminates duplicate columns; each column contains atomic
values.
 2nd Normal Form (2NF): Ensures each column depends on the whole primary key.
 3rd Normal Form (3NF): Ensures columns depend only on the primary key, not
other columns.
 Boyce-Codd Normal Form (BCNF): Strengthens 3NF by handling anomalies.

6. SQL – Structured Query Language


SQL is the standard language for interacting with relational databases.

6.1 Types of SQL Commands

 Data Definition Language (DDL): Defines database structure (CREATE, ALTER,


DROP).
 Data Manipulation Language (DML): Modifies data (INSERT, UPDATE,
DELETE).
 Data Query Language (DQL): Retrieves data (SELECT).
 Data Control Language (DCL): Manages access rights (GRANT, REVOKE).
 Transaction Control Language (TCL): Manages transactions (COMMIT,
ROLLBACK).

6.2 Example SQL Queries

 Create a Table:
 CREATE TABLE Students (
 ID INT PRIMARY KEY,
 Name VARCHAR(50),
 Age INT
 );
 Insert Data:
 INSERT INTO Students (ID, Name, Age) VALUES (1, 'Alice', 22);
 Retrieve Data:
 SELECT * FROM Students;
 Update Data:
 UPDATE Students SET Age = 23 WHERE ID = 1;
 Delete Data:
 DELETE FROM Students WHERE ID = 1;

7. Transactions and Concurrency Control


A transaction is a sequence of operations that ensures data consistency.

7.1 ACID Properties

 Atomicity: Ensures all operations in a transaction are completed or none are.


 Consistency: Ensures a transaction maintains database integrity.
 Isolation: Ensures concurrent transactions do not interfere with each other.
 Durability: Ensures committed transactions persist even after system failures.

7.2 Concurrency Control

 Locking Mechanisms: Prevents data conflicts in multi-user environments.


 Optimistic and Pessimistic Concurrency Control: Balances performance and
consistency.

8. Database Security and Backup


8.1 Security Mechanisms

 Authentication: Ensures only authorized users access the database.


 Authorization: Controls user permissions (read, write, delete).
 Encryption: Protects data from unauthorized access.

8.2 Backup Strategies

 Full Backup: Copies the entire database.


 Incremental Backup: Backs up only changed data.
 Replication: Duplicates data across multiple servers for high availability.

9. NoSQL vs. SQL Databases


Feature SQL Databases (Relational) NoSQL Databases
Flexible schema (documents, key-value,
Structure Tables with fixed schema
graph)
Feature SQL Databases (Relational) NoSQL Databases
Scalability Vertical (increase hardware power) Horizontal (add more servers)
Banking, e-commerce, enterprise
Use Cases Big data, social media, IoT
apps

Popular NoSQL databases: MongoDB, Cassandra, Redis, Neo4j.

10. Applications of DBMS


DBMS plays a crucial role in various domains:

 Banking: Transactions, account management.


 E-Commerce: Product catalogs, customer data.
 Healthcare: Patient records, medical history.
 Education: Student records, course management.
 Social Media: User profiles, posts, messages.

11. Conclusion
Database Management Systems (DBMS) are essential for efficient data management. From
relational databases using SQL to NoSQL databases for large-scale applications, DBMS
technologies continue to evolve. Understanding the fundamentals of database architecture,
data models, normalization, SQL, transactions, and security helps in building robust and
scalable applications.

You might also like