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

Unit-4-DDBMS (1)

The document discusses database recovery techniques and security, emphasizing the importance of restoring databases to a consistent state after failures. It covers types of failures, recovery methods, and the characteristics of distributed databases, including replication and fragmentation. Additionally, it highlights the role of information retrieval in DBMS, focusing on structured data management, query processing, and optimization for efficient data access.

Uploaded by

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

Unit-4-DDBMS (1)

The document discusses database recovery techniques and security, emphasizing the importance of restoring databases to a consistent state after failures. It covers types of failures, recovery methods, and the characteristics of distributed databases, including replication and fragmentation. Additionally, it highlights the role of information retrieval in DBMS, focusing on structured data management, query processing, and optimization for efficient data access.

Uploaded by

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

DATABASE MANAGEMENT SYSTEM

SCSA1301
UNIT 4 RECOVERY AND
SECURITY

Database Recovery Techniques


Database Security
 Debate on the distributed databases and Client- Server
Architecture with reference to Indian Railway Reservation System.
Database Recovery
Techniques
Database Recovery:
Database recovery techniques are used in database management
systems (DBMS) to restore a database to a consistent state after a failure
or error has occurred.
The main goal of recovery techniques is to ensure data integrity and
consistency and prevent data loss. There are mainly two types of recovery
techniques used in DBMS:

Failure Classification:
i) Transaction Failure
ii) System Failure
[1] Transaction Failure

When a Transaction is failed to execute or it reaches a point after which cannot be


completed successfully it has to abort
Logical error and system error cause a transaction to fail.
a)Logical Error: Transaction cannot complete because of code error or any internal error.

b)System Error : Data base system itself terminates an active transaction, database is not able
to execute it
[2] System Failure

ii)System Failure

a)System Crash : : Interruption in power supply , Failure of underlying hardware or software


failure
b)Disk Failure: It occurs part of the stable storage is destroyed.(E.g Formation of bad sector , disk
head crash )
[3] Storage Media and Access Failure

Various data items in the database stored and accessed in a number of different storage
media

a)Storage type
Volatile storage: Computer Memory that heads power to preserve stored data. (E.g Cache
Memory)
Non –Volatile Memory: Secondary Storage or Long term Storage.(E.g Hard Disk ,
Magnetic Tape, Flash Memory)
Stable Storage : Information Residing in Stable storage is never lost.
b)Data Access:
Database is stored in non volatile storage and is portioned into fixed length storage unit
called blocks.
It may contain several data items.
Transactions input information from the disk into main memory.
Output information back onto the disk.
Input and output operations are completed by blocks
Recovery Techniques
10
Database Recovery
Data Update
 Immediate Update: It is a technique for the maintenance of the transaction log files of the
DBMS. It is also called UNDO/REDO technique. It is used for the recovery of transaction
failures that occur due to power, memory, or OS failures.
 Deferred Update: It is a technique for the maintenance of the transaction log files of the

DBMS. It is also called NO-UNDO/REDO technique. It is used for the recovery of


transaction failures that occur due to power, memory, or OS failures..
 Shadow update: Shadow paging is a technique employed in DBMS to maintain data

consistency and enable crash recovery. It involves creating a shadow copy or snapshot
of the entire database, which serves as a consistent version for transaction execution.
 In-place update: The disk version of the data item is overwritten by the cache version. An in-place

upgrade allows you to go from an older operating system to a newer one while keeping
your settings, server roles, and data intact. This article will teach you how to move to a
later version of Windows Server using an in-place upgrade. Important.
11
12
13
14
15
16
17
18
19
20
21
22
23
Database Security

24
25
26
27
28
29
30
31
Debate on
Distributed Database and Client Server Architecture

32 DBMS-UNIT-IV 02/21/25
A distributed database is basically a database that is not limited to one system, it is

spread over different sites, i.e, on multiple computers or over a network of


computers.
A distributed database system is located on various sites that don’t share physical

components.
This may be required when a particular database needs to be accessed by various

users globally. It needs to be managed such that for the users it looks like one
single database.

33
 Types:
1. Homogeneous Database:
In a homogeneous database, all different sites store database identically. The
operating system, database management system, and the data structures
used – all are the same at all sites. Hence, they’re easy to manage.
2. Heterogeneous Database:

In a heterogeneous distributed database, different sites can use different


schema and software that can lead to problems in query processing and
transactions. Also, a particular site might be completely unaware of the
other sites. Different computers may use a different operating system,
different database application. They may even use different data models for
the database. Hence, translations are required for different sites to

34
communicate.
Applications of Distributed Database:
 It is used in Corporate Management Information System.
 It is used in multimedia applications.
 Used in Military’s control system, Hotel chains etc.
 It is also used in manufacturing control system.

35
Distributed Database Concepts
What constitutes a distributed database?

Connection of database nodes over computer network

Logical interrelation of the connected databases

Possible absence of homogeneity among connected nodes

Distributed database management system (DDBMS)

Software system that manages a distributed database

36 DBMS-UNIT-IV 02/21/25
Distributed Database Concepts (cont’d.)

Local area network

Hubs or cables connect sites

Long-haul or wide area network

Telephone lines, cables, wireless, or satellite connections

Network topology defines communication path

Transparency

Hiding implementation details from the end user

37 DBMS-UNIT-IV 02/21/25
Distributed Database Example

38 DBMS-UNIT-IV 02/21/25
Distributed Database Storage
Distributed database storage is managed in two ways:
Replication
Fragmentation

Replication
In database replication, the systems store copies of data on
different sites. If an entire database is available on multiple
sites, it is a fully redundant database.
The advantage of database replication is that it increases data
availability on different sites and allows for parallel query
requests to be processed.

39
40
Fragmentation
When it comes to fragmentation of distributed database storage, the
relations are fragmented, which means they are split into smaller
parts. Each of the fragments is stored on a different site, where it is
required.
The prerequisite for fragmentation is to make sure that the fragments
can later be reconstructed into the original relation without losing
data.
The advantage of fragmentation is that there are no data copies,
which prevents data inconsistency.
There are two types of fragmentation:
Horizontal fragmentation - The relation schema is fragmented into
groups of rows, and each group (tuple) is assigned to one fragment.
Vertical fragmentation - The relation schema is fragmented into
smaller schemas, and each fragment contains a common candidate
41
key to guarantee a lossless join.
Characteristics of DDB
Availability

Probability that the system is continuously available during a time interval

Reliability

Probability that the system is running (not down) at a certain time point

Both directly related to faults, errors, and failures

Fault-tolerant approaches

42 DBMS-UNIT-IV 02/21/25
Scalability and Partition Tolerance
Horizontal scalability

Expanding the number of nodes in a distributed system

Vertical scalability

Expanding capacity of the individual nodes

Partition tolerance

System should have the capacity to continue operating while the

network is partitioned

43 DBMS-UNIT-IV 02/21/25
Advantages of Distributed Databases
 Improved ease and flexibility of application development

Development at geographically dispersed sites

 Increased availability

Isolate faults to their site of origin

 Improved performance

Data localization

 Easier expansion via scalability

Easier than in non-distributed systems

44 DBMS-UNIT-IV 02/21/25
Data Fragmentation in Distributed Database Design

Fragments

Logical units of the database

Horizontal fragmentation (sharding)

Horizontal fragment or shard of a relation is a subset of the tuples in that relation

Can be specified by condition on one or more attributes or by some other method

Groups rows to create subsets of tuples

 Each subset has a certain logical meaning

45 DBMS-UNIT-IV 02/21/25
Data Fragmentation (cont’d.)
Vertical fragmentation

Divides a relation vertically by columns

Keeps only certain attributes of the relation

Complete horizontal fragmentation

Apply UNION operation to the fragments to reconstruct relation

Complete vertical fragmentation

Apply OUTER UNION or FULL OUTER JOIN operation to reconstruct relation

46 DBMS-UNIT-IV 02/21/25
Data Replication and Allocation
 Fully replicated distributed database

 Replication of whole database at every site in distributed system

 Improves availability remarkably

 Update operations can be slow

 Partial replication

 Some fragments are replicated and others are not

 Defined by replication schema

 Data allocation (data distribution)

 Each fragment assigned to a particular site in the distributed system

 Choices depend on performance and availability goals of the system

47 DBMS-UNIT-IV 02/21/25
48 DBMS-UNIT-IV 02/21/25
An Overview of Three-Tier Client/Server Architecture
Division of DBMS functionality among the three tiers can vary

49 DBMS-UNIT-IV 02/21/25
An Overview of Railway Reservation System

50 DBMS-UNIT-IV 02/21/25
DFD - Railway Reservation System

51 DBMS-UNIT-IV 02/21/25
52 DBMS-UNIT-IV 02/21/25
53 DBMS-UNIT-IV 02/21/25
Information Retrieval

54
Information Retrieval

Information retrieval in the context of a Database Management System (DBMS) refers to


the process of retrieving data or information from a structured database.
 Unlike traditional information retrieval systems that deal with unstructured or semi-
structured data, DBMS focuses on structured data that is organized into tables, rows, and
columns. Here are some key aspects of information retrieval in DBMS:

55
Structured Data: DBMSs manage structured data, which means that the data is organized into predefined
tables, and each table has a fixed schema with columns and data types. This structured nature makes it easier to
retrieve specific information.

Query Language: DBMSs provide a query language, such as SQL (Structured Query Language), which
allows users to specify the criteria for retrieving data from the database. Users can write SQL queries to retrieve
data that meets certain conditions.

Data Models: DBMSs use different data models, such as the relational model, hierarchical model, or network
model. The relational model, which organizes data into tables with rows and columns, is the most widely used.

Query Processing: When a query is submitted to a DBMS, it goes through a query processing phase. During
this phase, the DBMS parses the query, optimizes it for efficient retrieval, and then executes it to retrieve the
56
requested data.
Indexing: To speed up data retrieval, DBMSs often use indexing structures. Indexes are data structures that
allow the DBMS to quickly locate and retrieve specific rows of data based on the values in one or more
columns. Common indexing methods include B-tree and hash indexes.

Joins: Relational DBMSs allow users to perform joins, which involve combining data from multiple tables
based on a common column. Joins are a powerful feature for retrieving related information from multiple
tables.
Security and Access Control: DBMSs enforce security and access control to ensure that only authorized
users can retrieve certain information. Access control mechanisms allow administrators to specify who can
access the database and what data they can retrieve.

Transaction Management: In a multi-user environment, DBMSs ensure data consistency through transaction
management. Users can retrieve data within transactions, and the DBMS ensures that changes made by one
57 do not interfere with others' retrieval of data.
user
Scalability: DBMSs are designed to handle large volumes of data and are often scalable, allowing for the
efficient retrieval of data even as the database grows.

Optimization: DBMSs use query optimization techniques to choose the most efficient way to retrieve data
based on the query and the database's structure. This includes selecting the appropriate indexes and access
paths.

Caching: Some DBMSs implement caching mechanisms to store frequently retrieved data in memory,
reducing the need to access data from disk and improving retrieval performance.

Information retrieval in DBMS is critical for various applications, ranging from business data analysis and
reporting to web-based applications and e-commerce systems. The efficiency and effectiveness of data retrieval
are essential for ensuring that users can access the right information at the right time from a database.
58

You might also like