0% found this document useful (0 votes)
20 views10 pages

Dbms 1

Js

Uploaded by

Harsh
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)
20 views10 pages

Dbms 1

Js

Uploaded by

Harsh
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/ 10

Introduction to

Database
Management
Systems (DBMS)
A Database Management System (DBMS) is a software application that
enables users to create, manage, and access databases. It acts as an
intermediary between users and the database, providing a structured way to
store, organize, and retrieve information. DBMSs play a crucial role in modern
organizations, facilitating data-driven decision-making, efficient data
management, and seamless data sharing across various applications.

Harsh
2301301138
Data Abstraction and Models
Data abstraction is a key concept in DBMS, simplifying complex data structures into manageable
representations. It involves hiding unnecessary details from users, presenting them with a simplified view
of the data. Common data models used in DBMS include:

Relational Model Hierarchical Model


1 2
The relational model organizes data into The hierarchical model represents data in a
tables with rows and columns, using tree-like structure, with a parent-child
relationships between tables to represent relationship between data elements. It's
connections. It's known for its simplicity efficient for representing data with clear
and ease of use. hierarchies but can be complex for handling
relationships.

Network Model Object-Oriented Model


3 4
The network model is an extension of the The object-oriented model uses objects
hierarchical model, allowing multiple with properties and methods to represent
parent-child relationships between data data, allowing for more complex
elements, providing more flexibility. relationships and data types. It's well-suited
However, it can be challenging to manage for modeling real-world objects and their
the complexity of relationships. interactions.
Database Architecture
Database architecture encompasses the design and structure of a DBMS. It outlines the different components that work together to
manage and process data. Key components of a typical DBMS architecture include:

Database DBMS Engine Data Dictionary


The central repository of data, The core component responsible for A system catalog that stores metadata
containing tables, views, and other data managing and processing data. It about the database, including tables,
structures. It stores the actual data handles tasks like data storage, retrieval, columns, data types, constraints, and
managed by the DBMS. update, and deletion. It also enforces relationships. It's essential for managing
data integrity and security. and understanding the database schema.
Data Definition Language (DDL)
The Data Definition Language (DDL) is a set of commands used to define and modify the
structure of a database. It allows users to create, alter, and drop database objects, such as tables,
views, indexes, and constraints. DDL operations are essential for setting up the database schema
and ensuring data integrity.

Command Description

CREATE TABLE Creates a new table with specified columns


and data types.

ALTER TABLE Modifies an existing table, adding, deleting,


or altering columns or constraints.

DROP TABLE Deletes a table and its associated data.

CREATE INDEX Creates an index on a column or set of


columns to speed up data retrieval.

DROP INDEX Deletes an index from a table.


Data Manipulation Language
(DML)
The Data Manipulation Language (DML) is a set of commands used to manipulate data
within a database. It allows users to insert, update, delete, and retrieve data from
tables. DML operations are essential for managing and maintaining the data stored in
the database.

INSERT UPDATE
1 2
Inserts new rows into a table, Modifies existing rows in a table,
specifying the values for each changing the values of specific
column. columns.

DELETE SELECT
3 4
Removes rows from a table based Retrieves data from tables based
on specified criteria. on specific criteria, allowing users
to query and retrieve relevant
information.
Transaction Management
Transaction management is a crucial aspect of database systems, ensuring data consistency and integrity. It
involves grouping related database operations into a single logical unit called a transaction. A transaction is
either fully completed, committing changes to the database, or fully rolled back, undoing all changes if any
step fails.

Begin Transaction
Marks the start of a transaction, creating a savepoint to track changes.

Data Operations
Includes INSERT, UPDATE, DELETE, or other operations modifying database data.

Commit Transaction
Persists all changes made within the transaction, making them permanent in the database.

Rollback Transaction
Reverts all changes made within the transaction, restoring the database to its state before the
transaction began.
Concurrency Control
Concurrency control addresses the issue of multiple users accessing and modifying data in a
database simultaneously. It ensures data integrity and avoids inconsistencies that can occur
when multiple transactions interact with the same data. Various methods are used for
concurrency control, including:

Locking Timestamping
1 2
Locking mechanisms prevent multiple Timestamping assigns timestamps to
transactions from accessing and transactions, allowing the database to
modifying the same data determine the order in which
concurrently, ensuring data transactions should be executed.
consistency. Different types of locks Transactions with earlier timestamps
include exclusive locks, shared locks, are given priority, preventing
and two-phase locking. inconsistencies.

Optimistic Concurrency Control


3
This approach assumes conflicts between transactions are rare and allows
transactions to proceed without locking. It checks for conflicts only when a
transaction is ready to commit, potentially rolling back transactions if conflicts occur.
Security and Integrity
Database security and integrity are paramount to ensure data confidentiality, availability, and reliability. DBMSs employ various
security mechanisms to protect data from unauthorized access and ensure data integrity:

Authentication and Data Encryption Access Control


Authorization
Data encryption transforms data into an Access control restricts access to
User authentication verifies the identity unreadable format, protecting sensitive specific data based on user roles and
of users accessing the database, while information from unauthorized access. privileges, limiting access to authorized
authorization controls what data they Encryption algorithms are used to users. It helps prevent unauthorized
can access and what operations they can encrypt data at rest and in transit. access and data breaches.
perform.
Backup and Recovery
Backup and recovery procedures are essential for ensuring data availability in case of system failures, disasters, or accidental data loss. DBMSs offer various
backup and recovery mechanisms:

1 Full Backup 2 Incremental Backup


Creates a complete copy of the entire database, including all data and Backs up only changes made since the last full or incremental backup.
schema. It's a time-consuming process but provides the most It's a faster and more efficient option but requires a full backup for
comprehensive backup. restoration.

3 Differential Backup 4 Log-Based Recovery


Backs up all changes made since the last full backup. It's a faster Tracks all database changes in a log file. It can be used to restore data
option than a full backup but requires a full backup for restoration. to a specific point in time, even if a full backup is not available.
Conclusion
Database Management Systems (DBMS) are essential tools for managing and
accessing data in modern organizations. They provide a structured and
efficient way to store, organize, and retrieve information, enabling data-
driven decision-making and seamless data sharing. Understanding the key
concepts of DBMS, including data abstraction, data models, database
architecture, DDL, DML, transaction management, concurrency control,
security, and backup and recovery, is crucial for effective database
management and utilization.

You might also like