0% found this document useful (0 votes)
49 views34 pages

DMS Chapter5 Full

Uploaded by

vaidyashardul445
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)
49 views34 pages

DMS Chapter5 Full

Uploaded by

vaidyashardul445
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/ 34

Database Management System

Unit 5 : Database Administration


(10 Marks )

Presented By :
Mrs. Samidha Chavan
Lecturer -Department of Information Tech.
Vidyalankar Polytechnic, Wadala (Mumbai)
Unit 5 : Database Administration
1.Introduction to Database Administration :
1.Database Users
2.Create and delete users
3.Assign privileges
2.Transaction :
1.Concept
2.Properties and state of Transaction
3.Database Backup :
1.Types and Causes of Failure
2.Database backup introduction
3.types of database backups:Physical & Logical
Unit 5 : Database Administration
4.Data Recovery –
1. Recovery concepts
2. Recovery techniques -roll forward ,Rollback

5. Overview of Advanced database concepts:


1. Data Warehouse
2. Data lakes
3. Data mining
4. Big data
5. Mongo DB
6. Dynamo DB
Database Users
System Privileges
Object Privileges
ACID Properties
ACID Properties
ACID Properties
State diagram for Transaction
Explain Types of Errors
Database Backup
Q. Describe the different types and causes of Database failure. (S-23) 4 Marks

Ans:
1. Hardware Failure/System crash:
There is a hardware malfunction that causes the loss of the content of volatile
storage, and it brings transaction processing to a halt. The content of non-
volatile storage remains intact and is not corrupted or changed.
2. Software Failure:
The database software or the operating system may be corrupted or fail to
work correctly, that may cause the loss of the content of volatile storage, and
results in database failure.
3. Media Failure:
A disk block loses its content as a result of either a head crash or failure during
a data transfer operation.
4. Network Failure:
A problem with network interface card or network connection and cause
network failure.
5. Transaction Failure
i) Logical error: the transaction can no longer continue with its normal
execution because of some internal condition, such as wrong input values,
data not found, data overflow or resource limit exceeded.
ii) System error: A system entered in state like deadlock
6. Application software Error:
The problem with software accessing the data from database. -This may
cause database failure as data cannot be updated using such application to
it. -Logical errors in the program cause one or more transaction failures.
7. Physical disaster
The problem was caused by floods, fire, earthquakes etc.
Q1. Explain Transaction Concept ?
Answer :
Transaction
• Transaction is logical units of work.
• It contains a group of tasks.
Operations of Transaction:
Read(X): Read operation is used to read the value of X from the
database and stores it in a buffer in main memory.
Write(X): Write operation is used to write the value back to the
database from the buffer.

For Example -
Transaction T1 : Transfer Rs.50 from account A to B
Q2. How to create and Drop Users?

Creating a Database User:

Example:
If we want to create user named Ajay then following
command should be written:

CREATE USER Ajay IDENTIFIED BY MyPassword;

Dropping a Database User:

Example
If user Ajay's schema contains no objects, then you can
drop Ajay’s by issuing the statement:

DROP USER Ajay;


Q3. Explain Database Recovery Techniques in DBMS
Answer :
Database recovery Techniques :
• It is process of restoring lost , corrupted, deleted data to its
original location .
• Database recovery techniques are used in DBMS to restore a
database to a consistent state after a failure.
• The main goal of recovery techniques is to ensure data integrity
and consistency and prevent data loss.

• Database Recovery Techniques are :


1. Log Based Recovery
2. Shadow Paging recovery
3. Checkpoints
Q4. Explain Log Based Recovery
Log Based Recovery –
• The log record contains recording of all update activities done on
database by database users.
• Transaction log contains
1. Transaction identifier
2. Data identifier
3. Old value
4. New value
• Log based Recovery use logs of all transactions for recovering
database after failure
• For Example
1. Deferred Modification Technique (REDO algorithm)
2. Immediate Modification Technique (UNDO algorithm)
Q5. Explain Shadow Paging Recovery
Shadow Paging Recovery –
• database is considered as made up of fixed size of logical units of storage
which are called as pages.
• pages are mapped into physical blocks of storage, with help of the page
table.
• This method uses two page tables named current page table and shadow
page table.
• When transaction begins both these table points to same location.
• At the time of transaction execution -
1. Shadow page table doesn't changed at all. ( old state of transaction )
2. Current page table will get change ( new state of transaction)
• In case of no failure , transaction is committed and system deletes - Shadow
directory .
• Incase of failure we can recover data from shadow page table .
Shadow Paging Recovery
Q6. Explain Checkpoint Recovery
Checkpoint Recovery –

• The recovery system reads log files from the end to start. It reads log files
from T4 to T1.
• Recovery system maintains two lists, a redo-list, and an undo-list.
• transaction is committed after the checkpoint is crossed. Hence it puts T1,
T2 and T3 transaction into redo list.
• T4 will be put into undo list since this transaction is not yet complete and
failed.
Q7. Give difference between Rollback and Roll forward database
recovery Techniques.

Parameters Rollback Roll forward


Direction Rollback restores a previous roll forward applies new
version features and improvements.

Complexity Rollback is generally simpler Roll forward can be complex


due to updates

Purpose Rollback undoes transactions Roll forward replays the effects


that haven't been saved in the of a transaction
database
Use Rollback is used to undo roll forward is used to recover a
changes database.
Advanced Database Concepts:
• Data warehouse
• Data lakes
• Data mining
• Big data
• Mongo DB
• DynamoDB
Q8 Explain Data Warehouse ?

Data Warehouse :

• Data warehousing can be defined as the process of data collection and storage
from various sources and managing it to provide valuable business insights.
• Extract, transform, and load (ETL) is the process of combining data from
multiple sources into a large, central repository called a data warehouse
Steps in Data Warehousing
1. Extraction of data - A large amount of data is gathered from various sources.
2. Transformation of data – It is cleansing of data .(The data is scanned for errors, and
any error found is either corrected or excluded. After being cleaned, the format is
changed from the database to a warehouse format.)
3. Loading data - Storing data in warehouse format.

DataMart :
• Data Mart is subset of Data warehouse .
• Data Mart is created for specific purpose as per business needs.
Data Warehouse Data Mart
It is enterprise wide and it has large Data Mart is department wise
storage capacity
It stores historical data and summarized It stores data about particular topic
data
Implementation is done within a year Implementation is done within a month
It is Flexible It is restrictive
Q9.Explain Data Lake ?
Data Lake :
• A data lake is a centralized repository designed to store, process, and secure large
amounts of structured, semi structured, and unstructured data.

• Data lakes can be used for big data analytics, machine learning, and other types
of intelligent action.
• Data lakes can be used for reporting and visualization.
• Data lakes can process data in real time or batch mode
Q10.Explain Data Mining ?
Data Mining :
• Data mining is the overall process of identifying patterns and extracting useful insights
from big data sets.
• This can be used to evaluate both structured and unstructured data
• It is commonly used to analyze consumer behaviors for marketing and sales teams.

Figure : Knowledge discovery Process


(KDD) in Data Mining (DM)
Q11.Explain Big Data ?
Big Data :
• Big data refers to large collections of structured, unstructured, and semi-structured data
that continues to grow exponentially over time.
• Big data can help companies make more accurate business decisions.
• Characteristics of Big Data ( 3 V’s)
• Volume – It refers to data size
• Velocity – It refers to speed of data change
• Variety – It refers to Data sources . Structured, semi structured , unstructured etc.
• Big data is processed through a variety of steps, including filtering, combining, and
rendering.
• Big data is often stored in data lakes, which can store large amounts of data in its original
format without preformatting.
• Big Data Software uses Apache Hadoop is an open-source framework
Q12.Explain Mongo DB ?
Mongo DB :
• MongoDB is a non-relational database management system (DBMS)
• MongoDB is the world's most popular NoSQL database.
• It stores data using documents instead of tables
• The basic methods of interacting with a MongoDB server are called CRUD operations.
CRUD stands for Create, Read, Update, and Delete.
• It uses a JSON format (JavaScript Object Notation) to store documents.

Figure : Mongo DB document


Q13.Explain DynamoDB ?
DynamoDB:
• Amazon DynamoDB is a server less, NoSQL database service.
• Core components of DynamoDB are :
1. Tables
2. Items
3. Attributes
• DynamoDB supports three data types (number, string, and binary)
• Characteristics of DynamoDB
1. Server less
2. NoSQL
3. Fully managed (It handles setup, configurations, maintenance, high availability,
hardware provisioning, security, backups, monitoring)
4. Single-digit millisecond performance at any scale

You might also like