DBMS - Lecture 1
DBMS - Lecture 1
DATABASE MANAGEMENT
SYSTEM
01/22/2024
Instructor Details
2
01/22/2024
Course Catalog
3
01/22/2024
Course Objectives
4
The course will provide the description of databases, their typical users, DBMS
concepts, terminology, and architecture,
The concepts of the Entity-Relationship (ER) model, illustrate conceptual database
design, data abstraction and semantic data modeling concepts, and extends the ER model
to incorporate these ideas, leading to the enhanced-ER data model and EER diagrams,
The basic concepts necessary for a good understanding of databases design and
implementation,
The conceptual modeling techniques used in database systems, the relational data model
object-relational systems.
01/22/2024
Course Outcome
5
CO2 Identify the modules, features and entities along with the relationships of a
software system
CO3 Analyze a system and normalize for implementation and applying SQL for data
manipulation.
01/22/2024
Study Materials
6
Text Book:
Fundamental of Database System by Ramez Elmasri 7th Edition
Reference Books:
Database System Concept – Silberschatz−Korth−Sudarshan 6th Edition
Database Management Systems – Ramkrishnan and Gehrke 3rd Edition
01/22/2024
Consultation Hour
7
01/22/2024
Introduction
8
Data:
Definition: Data refers to raw facts, figures, symbols, or information that can be processed to gain insights or
knowledge.
It can take various forms, including text, numbers, images, audio, video, etc. Data is the foundation for generating
information.
Database:
Definition: A database is a structured collection of data that is organized and stored in a way that allows for efficient
retrieval, updating, and management.
Databases can be as simple as a single file or complex systems with multiple interconnected components. They are
designed to store and organize data to facilitate easy access and manipulation.
Database Management System (DBMS):
Definition: A Database Management System (DBMS) is software that provides an interface for interacting with
databases.
It is a set of programs or software tools that allows users to define, create, manage, and manipulate databases. The
primary purpose of a DBMS is to ensure the efficient and secure storage, retrieval, and management of data. It acts
as an intermediary between the user and the database, handling tasks such as data definition, data manipulation, and
data security. 01/22/2024
What is DBMS?
9
01/22/2024
A database that stores student and course information
10
Database
01/22/2024
Key features of a DBMS
11
Data Definition Language (DDL): Allows the definition of the database structure,
specifying data types, relationships, and constraints.
Data Manipulation Language (DML): Enables users to interact with the data, including
querying, updating, and deleting records.
Transaction Management: Ensures the integrity of the database by providing features like
ACID properties (Atomicity, Consistency, Isolation, Durability) to handle transactions.
Concurrency Control: Manages access to the database by multiple users to prevent
conflicts and ensure data consistency.
Data Security: Provides mechanisms for user authentication and authorization to control
access to the database.
Backup and Recovery: Offers tools to create backups and restore the database in case of
data loss or corruption.
01/22/2024
ACID Properties in DBMS
12
01/22/2024
ACID Properties in DBMS
13
The ACID properties are a set of characteristics that guarantee the reliability and
consistency of database transactions. These properties are fundamental to maintaining
the integrity of data in a database system.
Atomicity:
Definition: Atomicity ensures that a transaction is treated as a single, indivisible unit of work.
Implication: Either all the operations within a transaction are executed, or none are. If any part of the
transaction fails, the entire transaction is rolled back to its previous state, ensuring that the database
remains in a consistent state.
Consistency:
Definition: Consistency ensures that a transaction brings the database from one valid state to another.
Implication: The execution of a transaction should adhere to all integrity constraints defined in the
database. If the database is in a consistent state before the transaction begins, it should also be in a
consistent state after the transaction is completed.
01/22/2024
ACID Properties in DBMS
14
The ACID properties are a set of characteristics that guarantee the reliability and consistency of
database transactions. These properties are fundamental to maintaining the integrity of data in a
database system.
Isolation:
Definition: Isolation ensures that the concurrent execution of transactions does not lead to interference
between them.
Implication: Each transaction should appear as if it is the only transaction being executed, even though
multiple transactions may be occurring simultaneously. Isolation prevents one transaction from affecting the
outcome of another transaction that is running concurrently.
Durability:
Definition: Durability guarantees that once a transaction is committed, its effects persist even in the case of
system failures.
Implication: Once a transaction is successfully completed (committed), the changes it made to the database are
permanent and survive any subsequent system failures, such as power outages or crashes. Durability is
typically achieved through mechanisms like transaction logging and periodic backups.
01/22/2024
Database Users
15
01/22/2024
Database Users
16
Administrators
Administrators maintain the DBMS and are responsible for administrating the database. They are
responsible to look after its usage and by whom it should be used. They create access profiles for users
and apply limitations to maintain isolation and force security.
Administrators also look after DBMS resources like system license, required tools, and other software
and hardware related maintenance.
Designers
Designers are the group of people who actually work on the designing part of the database.
They keep a close watch on what data should be kept and in what format. They identify and design the
whole set of entities, relations, constraints, and views.
End Users
End users are those who actually reap the benefits of having a DBMS.
End users can range from simple viewers who pay attention to the logs or market rates to sophisticated
users such as business analysts.
01/22/2024
DBMS Architecture
17
01/22/2024
Types of DBMS Architecture
18
01/22/2024
1-Tier Architecture
19
01/22/2024
2-Tier Architecture
20
01/22/2024
3-tier Architecture
23
Database (Data) Tier − At this tier, the database resides along with its query processing
languages. We also have the relations that define the data and their constraints at this level.
Application (Middle) Tier − At this tier reside the application server and the programs that
access the database. For a user, this application tier presents an abstracted view of the
database. End-users are unaware of any existence of the database beyond the application.
At the other end, the database tier is not aware of any other user beyond the application
tier. Hence, the application layer sits in the middle and acts as a mediator between the end-
user and the database.
User (Presentation) Tier − End-users operate on this tier and they know nothing about any
existence of the database beyond this layer. At this layer, multiple views of the database
can be provided by the application. All views are generated by applications that reside in
the application tier.
01/22/2024
Database schema
27
The data which is stored in the database at a particular moment of time is called an
instance of the database.
The overall design of a database is called schema.
A database schema is the skeleton structure of the database. It represents the logical
view of the entire database.
A schema contains schema objects like table, foreign key, primary key, views, columns,
data types, stored procedure, etc.
A database schema can be represented by using the visual diagram. That diagram shows
the database objects and relationship with each other.
A database schema is designed by the database designers to help programmers whose
software will interact with the database. The process of database creation is called data
modeling.
01/22/2024
Cont…
28
01/22/2024
Bank Database Schema
30
01/22/2024
Database Languages in DBMS
31
01/22/2024
Data Definition Language (DDL)
32
These commands are used to update the database schema that's why
they come under Data definition language.
01/22/2024
Data Manipulation Language (DML)
34
DML stands for Data Manipulation Language. It is used for accessing and
manipulating data in a database. It handles user requests.
Here are some tasks that come under DML:
Select: It is used to retrieve data from a database.
Insert: It is used to insert data into a table.
Update: It is used to update existing data within a table.
Delete: It is used to delete all records from a table.
Merge: It performs UPSERT operation, i.e., insert or update operations.
Call: It is used to call a structured query language or a Java subprogram.
Explain Plan: It has the parameter of explaining data.
Lock Table: It controls concurrency.
01/22/2024
Data Control Language (DCL)
35
DCL stands for Data Control Language. It is used to retrieve the stored or
saved data.
The DCL execution is transactional. It also has rollback parameters.
(But in Oracle database, the execution of data control language does not have
the feature of rolling back.)
Here are some tasks that come under DCL:
Grant: It is used to give user access privileges to a database.
Revoke: It is used to take back permissions from the user.
There are the following operations which have the authorization of Revoke:
CONNECT, INSERT, USAGE, EXECUTE, DELETE, UPDATE and SELECT.
01/22/2024
Transaction Control Language (TCL)
36
TCL is used to run the changes made by the DML statement. TCL can
be grouped into a logical transaction.
Here are some tasks that come under TCL:
Commit: It is used to save the transaction on the database.
Rollback: It is used to restore the database to original since the last
Commit.
01/22/2024
Applications
37
01/22/2024