Unit-4-DDBMS (1)
Unit-4-DDBMS (1)
SCSA1301
UNIT 4 RECOVERY AND
SECURITY
Failure Classification:
i) Transaction Failure
ii) System Failure
[1] Transaction Failure
b)System Error : Data base system itself terminates an active transaction, database is not able
to execute it
[2] System Failure
ii)System 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
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
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:
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?
36 DBMS-UNIT-IV 02/21/25
Distributed Database Concepts (cont’d.)
Transparency
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
Reliability
Probability that the system is running (not down) at a certain time point
Fault-tolerant approaches
42 DBMS-UNIT-IV 02/21/25
Scalability and Partition Tolerance
Horizontal scalability
Vertical scalability
Partition tolerance
network is partitioned
43 DBMS-UNIT-IV 02/21/25
Advantages of Distributed Databases
Improved ease and flexibility of application development
Increased availability
Improved performance
Data localization
44 DBMS-UNIT-IV 02/21/25
Data Fragmentation in Distributed Database Design
Fragments
45 DBMS-UNIT-IV 02/21/25
Data Fragmentation (cont’d.)
Vertical fragmentation
46 DBMS-UNIT-IV 02/21/25
Data Replication and Allocation
Fully replicated distributed database
Partial replication
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
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