Download as pdf or txt
Download as pdf or txt
You are on page 1of 45

Cheatsheet

DATABASE
MANAGEMENT SYSTEM

<...>/<...>
Connect with Alumni
What is DBMS?

A Database System is an organized collection of data stored electronically,


typically managed by a Database Management System (DBMS).

Data Integrity Data Security End Users

Efficient Data
Data Independence
Management
Database Applications

Purpose of
Database Systems Database Management
Systems

Data Recovery & Backup Scalability

Database
Query and
Data Independence
Transaction Support

02 DBMS Cheatsheet
Concurrent Access
and Multi-User
Support
Database Performance
Maintainance Overheads
Efficient Data Data Security
Retrieval

Advantages of DBMS Disadvantages of DBMS

Centralized Data Data Integrity


Management and Accuracy

Complexity and Dependency on


Cost Database Vendor

Data
Independence

Key Components of DBMS

Data Database DBMS Software


Raw facts or An organized Software that
information collection of facilitates the
related data management
of databases

03 DBMS Cheatsheet
Factual Information

Observations
Data
Values & Figures

Facts & Statistics

Database + DBMS

DBMS vs RDBMS vs File System

04 DBMS Cheatsheet
A Data Schema is a blueprint that
defines the structure, organization,
Users
and relationships of data stored in a
database. It provides a framework for
representing and storing information
Database Management
Systems in a systematic way.

Ensures a systematic and


Supports efficient query
organized arrangement of
execution
data

Importance of
Data Schemas

Facilitates easier
Enforces data accuracy
maintainance and
and consistency
scalability

05 DBMS Cheatsheet
Types of Data Schemas

User Schema Physical Schema Logical Schema


Represents how Describes how data Represents the
data appears to is stored physically logical relationships
different users on the storage and structure of
medium the entire database

Relational DBMS (RDBMS)


Types of
DBMS
NoSQL DBMS

Relational DBMS (RDBMS)

Relational DBMS (RDBMS)

Overview Characteristics of RDBMS Common RDBMS Examples

Rational Database Management


Structured Data Query Language
System (RDBMS) is a structured
Tables,
SQL
database system that organizes data Relationships MySQL PostgreSQL

into tables with define relationships,


Data Integrity
Microsoft SQL Server
enabling efficient storage, retrieval,
Acid Properties
and management through the use of
SQL queries.

06 DBMS Cheatsheet
NoSQL DBMS

NoSQL DMBS

Overview Types of NoSQL RDBMS Common NoSQL Examples

NoSQL Databases are flexible,


Document Store Key-Value Store
non-relational systems that provide
Flexible, JSON/ Simple,
scalable and distributed storage, BSON Documents Key-Value Pairs MongoDB Redis
accommodating various data models
Column-Family Store Graph Database
Cassandra Amazon DynamoDB
and allowing for efficient handling of Column Oriented Nodes and Edges for
large volumes of unstructured or Storage Graph Relationships

semi-structured data.

Data Models in DBMS

Hierarchical Model Network Model


Data is organized in a tree-like Extends the hierarchical model
structure with parent-child by allowing each record to have
relationships, suitable for multiple parent and child
representing one-to-many records, addressing complex
relationships relationships

Relational Model Object-Oriented Model


Represents data as tables with Organizes data as objects with
rows and columns, utilizing keys attributes and methods,
to establish relationships, & promoting encapsulation and
adhering to principles of inheritance for efficient
normalization to avoid representation of real-world
redundancy

07 DBMS Cheatsheet
2 Entity Relationships

Entity-Relationship Diagrams (ERD) are


visual representations that illustrate the
relationships among entities in a database.

Entities in a database represent Relationships in a database Attributes in a database are


distinct real-world objects or define connections between characteristics or properties of
concepts, and in entities, illustrating how data entities, providing details about
Entity-Relationship Diagrams, in one entity is related to data the data stored within
they are depicted as rectangles in another. each entity.
containing attributes.

Component Symbol
Entity

Relationships

Attribute

08 DBMS Cheatsheet
Cardinality in ERD

One-to-One One-to-Many Many-to-Many

Each record in the first entity Each record in the first entity Each record in the first entity
corresponds to exactly one can have many related records can be related to many
record in the second entity, in the second entity corresponds records in the second entity,
and vice versa. to only one record in the and vice versa.
first entity.

Example : One-to-One Example : One-to-Many


Employee Passport Department Employee

Employee_ID Passport_number Department_ID Employee_ID

Name Expiry_date Department_Name Name

Department
Each department can have many employees, but
Each employee has exactly one passport, & each each employee belongs to only one department.
passport is associated with exactly one employee

Example : Many-to-Many
Student Course

Student_ID Course_ID

Name Course_Name

Grade

Each student can enroll in many courses, and


each course can have many students.

09 DBMS Cheatsheet
3 Keys in DBMS

Primary Composite Candidate

Foreign Alternate Super

Primary Key Foreign Key

A unique identifier for each record in an entity, A field in one table that links to the primary key
often depicted in ERD as underlined attributes). in another table, establishing relationships
between entities.

Example:

Employee Department

Employee_ID Primary Key Department_ID

Name Department_Name

Department_ID Foreign Key

Relationship: Employee.Department_ID
Department.Department_ID

Composite Key

A composite key consists of two or more columns that, together, uniquely identify a record in a table.
It's used when a single column is not sufficient to ensure uniqueness.

10 DBMS Cheatsheet
Composite Key
A

Cust_Id Order_Id Prod_code Prod_name

001 121 P 12 P
003 123 P 10 Q
005 125 P3 R

Combined value of these two columns is unique

Candidate Key Alternate Key

A candidate key is a set of columns that can An alternate key is a candidate key that is not
uniquely identify a record in a table. From selected as the primary key. It can be used as a
these, one key is chosen as the primary key. unique identifier if needed.

Example:

StudID Roll No. First Name Last Name Email

1 43 Wayne Rooney wr10@scaler.com

2 44 Paul Scholes ps18@scaler.com

3 45 Roy Keane rk16@scaler.com

11 DBMS Cheatsheet
Super Key

A super key is a set of one or more columns


Super Key
that can uniquely identify a record. It may
Candidate Key
contain more columns than necessary to
uniquely identify a record. Primary Key

Example

Roll_No Name Age Phone

1 Tony 24 XXXXXXXX23

2 Wayne 18 XXXXXXXX13

3 Paul 34 XXXXXXXX43
XXXXXXXX23

4 Roy 38 XXXXXXXX66

Did Designation
1 BPO
2 Account
3 IT

12 DBMS Cheatsheet
4 Normalization

Normalization is a process of tidying up


Normalization
information in a database so that thereʼs no
unnecessary repetition, which can cause
1NF 2NF
problems when adding, deleting, or
updating data.
3NF BCNF

4NF 5NF

1NF (First Normal Form) 2NF (Second Normal Form) 3NF (Third Normal Form)
Ensures that each attribute in a Builds on 1NF and ensures that Further refines the normalization
table contains atomic values, non-prime attributes are fully process by ensuring that no
and there is no repeating functionally dependent on transitive dependencies exist.
groups. the primary key.

BCNF (Boyce Codd Normal Form) 4NF (Forth Normal Form) 5NF (Fifth Normal Form)
Ensures that there is no non- Extends normalization by Handles cases where certain
trivial functional dependencies addressing multi-valued join dependencies exist in
of attributes on the primary key. dependencies. the database.

Database Normalization 1NF 2NF 3NF

13 DBMS Cheatsheet
Table with
First Second Third Normal Boyce Codd Forth Fifth
Multi-valued
Normal Form Normal Form Form Normal Form Normal Code Normal Code
attributes

Remove Remove partial Remove partial Remove remaining Remove Remove


multi-valued dependencies dependencies anomalies resulting multi-valued remaining
attributes from functional attributes anomalies
dependencies

5 Indexing in DBMS

Indexing in database is a technique used to optimize


the retrival of records by creating a data structure
(index) that allows for quick and efficient lookup
of specific values or ranges

Provide Improved Helps in Faster Facilitate efficient


Search Performance Sorting and join operations
Aggregation between tables

Search Key Block Pointer


Index 1 Address of Block 1
Chapter 1 2
Chapter 2 40 Analogy 10 Address of Block 2

21 Address of Block 3
Chapter n 100

Index Page of a Book Index file of a database file

14 DBMS Cheatsheet
Outer Index
Search Key Block Pointer

Inner Index Inner Index Inner Index

Single entry / Index of an Index File


Block 1 Block 2 Block 3 Block 4 Block 5 Block 6

Types of Indexing

Single-Level Index Clustered Index Multi-Level Index Non-Clustered Index

Primary Index/Single-Level Index

Uses a single index structure to locate the actual data

15 DBMS Cheatsheet
Secondary Indexing

In secondary Indexing over the key field, the index is created on the unordered key field of the database file.
It is always a dense index.

Clustered Indexing

In clustered indexing, the index is created on the ordered nonkey field of the database file.

16 DBMS Cheatsheet
Non-clustered Indexing

A non-clustered index just tells us where the data lies, i.e. it gives us a list of virtual pointers or references to the location
where the data is actually stored. Data is not physically stored in the order of the index. Instead, data is present in leaf nodes

17 DBMS Cheatsheet
6 Structured Query Language

SQL is a standard programming language used for managing and manipulating relational
databases. It provides a set of commands for interacting with databases, allowing users to
define, query, update, and manage data efficiently.

DBMS Database
Users
Customers
SELECT..
FROM.. Orders
customer_id order_id
....
1 1001
2 1002
3 1003

Result
Apps

bit, tinyint, smallint, int,


Numeric bigint, decimal, numeric, float, real

Date/Time Date, Time, Datetime, Timestamp

Character/String Char, Varchar, Varchar (max), Text

SQL Data Types


Unicode Character/String NChar, NVarchar, NVarchar (max), Next

Binary, Varbinary,
Binary Varbinary (max), image

Miscellaneous Clob, Blob, XML, JSON

18 DBMS Cheatsheet
SQL (Structured Query Language) commands are instructions that interact with a relational
database management system (RDBMS). These commands allow users to perform various
operations such as querying data, updating records, inserting new data, and managing the
structure of a database

SQL Commands

Data Definition Data Manipulation Data Control Transaction Data Query


Language Language Language Control Language Language

CREATE INSERT GRANT COMMIT

DROP UPDATE REVOKE ROLLBACK

ALTER DELETE SAVEPOINT

TRUNCATE

= != < > <= >= AND OR NOT || % -

Comparison Operators Logical Operators Concatenation Operator Wildcard Operators

SQL Commands

IS NULL/IS NOT NULL EXITSTS Operator Arithmetic Operators LIKE Operator BETWEEN Operator
Operator

+
IS NULL IS NOT NULL - * / % LIKE BETWEEN

19 DBMS Cheatsheet
CRUD stands for create, read, update and delete which represent the fundamental
operations performed on data in a database.

Create Delete
CRUD
new item
Create (INSERT) Read (SELECT)
Used to add new Used to retrive data
records in the table. from one or more new item
tables
new item
Update Delete
new item
Used to modify existing Used to remove records
records in a table. from a table based on
a condition. Read Update

Read (SELECT) Example

peter@abc.com
suzi@abc.com
joseph@abc.com
alex@abc.com
mark@abc.com
stephen@abc.com

UPDATE Example

mike@abc.com
james@abc.com
robin@abc.com
stephen@abc.com
michael@abc.com

20 DBMS Cheatsheet
Create (INSERT) Example

DELETE Example

21 DBMS Cheatsheet
SQL Clauses are components of SQL statements that defines specific conditions or
actions.

FROM + (JOIN) WHERE


WHERE Clause ORDER BY Clause
Choose the table to Filter the base data
get the data
ARRAYTABLE LIMIT Clause

HAVING GROUP BY
GROUP BY Clause INTO Clause
Filter the aggregated Aggregates the base
data data

HAVING Clause OPTION Clause

SELECT ORDER BY

Final Data Sorts the final Data

Conditional Functions in SQL are used to


introduce logic and make decisions based
SQL Functions on a specified conditions within a query.

Conditional Functions Aggregate Functions


SQL Conditional Functions

String Functions Date Functions

CASE COALESCE
Mathematical Functions Performs conditional Returns the first non-
logic within a query. null value in a list.

22 DBMS Cheatsheet
CASE FUNCTION IN SQL

SELECT CASE WHEN -1<1 THEN TRUE ELSE


FALSE END AS RESULT;

RESULT TRUE

COALESCE FUNCTION IN SQL

Syntax Example 1 Example 2


x y 1st Occurrence no NON-NULL value

COALESCE ( value1, value2...) COALESCE ( NULL, 2, 3) COALESCE ( NULL, NULL, NULL)

Result : 2 Result : Null

Mathematical functions in SQL are used to perform various mathematcal operations on


numeric data types.

Mathematical Functions

ROUND CEIL / CEILING FLOOR

Rounds a numeric value to Rounds a numeric value up to Rounds a numeric value down
a specified number of the nearest integer. to the nearest integer
decimal places.

23 DBMS Cheatsheet
ROUND Function in SQL

SELECT ROUND ( 45.65, 1 );


ROUND ( 45.65, 1 ); 45.7

Number of Decimal
SQL ROUND ()
place round to
Output of ROUND ()
Numerical Value to be Rounded

CEIL FUNCTION IN SQL

SELECT CEILING ( 45.65 );


CEILING ( 45.65 ); 46

SQL CEILING()
Numerical Value Output of CEILING ()
to be Rounded

FLOOR FUNCTION IN SQL

SELECT FLOOR ( 45.65 );


FLOOR ( 45.65 ); 45

SQL FLOOR()
Numerical Value Output of FLOOR ()
to be Rounded

24 DBMS Cheatsheet
Aggregate Functions

SQL Aggregate Functions perform calculations


on a set of values and return a single result.

SQL Aggregate Functions

MAX () MIN () COUNT () AVG () MAX ()


Returns
. the Returns
. the Returns the Returns
. the Returns.the sum
maximum value minimum value number of rows average value of of values in a
in a specified in a specified in a result set. a specified specified
coloumn. coloumn. coloumn. coloumn.

MAX Function in SQL

MAX
31

25 DBMS Cheatsheet
MIN Function in SQL

MIN(age)
22

COUNT Function in SQL

COUNT(DISTINCT Country)
3

26 DBMS Cheatsheet
AVG Function SQL

average_age
25.6

SUM Function in SQL

total_sales
133509

27 DBMS Cheatsheet
String Function in SQL are used to manipulate and perform operations on character data,
typically text values.

String Functions

UPPER CONCAT

Converts a string Concatenates two


to uppercase. or more strings.

LENGTH LOWER

Returns the length Converts a string


of a string. to a lowercase.

UPPER Function in SQL LOWER Function in SQL

Syntax : Syntax :
UPPER (str) LOWER (str)
Example : Example :
UPPER (ʻtestʼ) LOWER (ʻTESTʼ)
test TEST TEST test
UPPER () LOWER ()

passing through function passing through function

CONCAT Function in SQL LENGTH Function in SQL

Syntax : Syntax :
CONCAT (string1, string2, string 3, ...) LENGTH (str)

Example : Example :
concat (” May be A-Z ”, “ or ”, “ may be 0-9 ”) LENGTH (ʻTESTʼ)
TEST 4
Output LENGTH ()
May be A-Z or may be 0-9
passing through function

28 DBMS Cheatsheet
Date functions in SQL are used to perform operations on date and time data types. These
functions help in manipulating, extracting, and formatting date values.

Date Functions

NOW DATE_FORMAT DATEDIFF


Returns the current Formats a date as per Calculates the
date and time. the specified format. difference between
two dates.

NOW FUNCTION IN SQL DATE_FORMAT FUNCTION IN SQL

Syntax : NOW( ) Syntax : DATE_FORMAT(date, format)

Example : NOW( ) Example :


DATE_FORMAT('2008-05-15 22:23:00', '%W %D %M %Y')

NOW( ) *result depends upon


2008-05-15 22:23:00
the current system
date and time '%W %D %M %Y'
DATE FORMAT( )

Output: 2015-04-14 10:55:19


Output: Thursday 15th May 2008

29 DBMS Cheatsheet
DATEDIFF FUNCTION IN SQL

Syntax : DATEDIFF(expr1, expr2)

Example :
DATEDIFF('2008-05-17 11:31:31', '2008-04-28')

2008-05-15 22:23:00
'%W %D %M %Y'
DATEDIFF( )
year month day
2008 05 17
(minus) - 2008 04 28

Joins in SQL

SOL JOIN is used to combine rows from two or more tables based on a related column
between them.

table1 table2 table1 table2 table1 table2 table1 table2

INNER JOIN LEFT JOIN RIGHT JOIN FULL JOIN

30 DBMS Cheatsheet
INNER JOIN

Table1 Table2

Key1 Key2 Key1 Column2


A 1 A 1
B 2 A 2
C 3 B 1
D 4 D 1
Result Set
E 5 E 3
a.Key1 b.Key2
A 1
A 2
SELECT a.Key1, b.Key2
B 3
FROM Table1 a
D 4
INNER JOIN Table2 b on a.Key1 = b.Key1
E 5

OUTER JOIN

table_A table_B Output


A M A N A M A N
1 m 2 p 2 n 2 p
2 n 3 q 1 m - -
4 o 5 r 4 o - -
- - 3 q
- - 5 r
SELECT * FROM table_A
FULL OUTER JOIN table_B
ON table_A.A=table_B.A;

31 DBMS Cheatsheet
LEFT JOIN

Employees
EmployeelD EmployeeName GenderID
SELECT EmployeeID, EmployeeName, Gender
1 Mark 1
FROM Employees LEFT JOIN Genders
2 Sara 2
ON Employees. GenderID = Genders. GenderID
3 Tom NULL

Query Result
Genders
GenderID Gender EmployeelD EmployeeName Gender
1 Male 1 Mark Male
2 Female 2 Sara Female
3 Not Specified 3 Tom NULL

RIGHT JOIN

Employees
EmployeelD EmployeeName GenderID
SELECT EmployeeID, EmployeeName, Gender
1 Mark 1
FROM Employees RIGHT JOIN Genders
2 Sara 2
ON Employees. GenderID = Genders. GenderID
3 Tom NULL

Query Result
Genders
GenderID Gender EmployeelD EmployeeName Gender
1 Male 1 Mark Male
2 Female 2 Sara Female
3 Not Specified NULL NULL NULL

SQL SET OPERATIONS

SQL Set Operations are used to combine the results of two or more SELECT queries into a
single result set. The common set operations include UNION, INTERSECT, and
EXCEPT/MINUS (depending on the SQL variant).

32 DBMS Cheatsheet
UNION INTERSECT

LEFT QUERY RIGHT QUERY LEFT QUERY RIGHT QUERY

Combines rows from both Keeps only those rows


the queries which are common in
both the queries.
FINAL RESULT FINAL RESULT

MINUS

LEFT QUERY RIGHT QUERY

Keeps rows from the


left query which are not
included in the right query
FINAL RESULT

33 DBMS Cheatsheet
INTERSECT EXAMPLE

1 1
2 2
2 2 1 4
3 3
3 3

A B A INTERSECTS B RESULT

MINUS EXAMPLE

1 1
2
2 2 1 4 1
3
3 3

A B A MINUS B RESULT

UNION / UNION ALL EXAMPLE

columnA columnB columnA


a c a
b UNION d b
c e c
d d
e

columnA columnB columnA


a c a
b UNION ALL d b
c e c
d c
d
d
e

34 DBMS Cheatsheet
SQL QUERY PROCESSING

SQL Query Processing involves parsing, optimizing, and executing SQL queries to retrieve
data from databases.

Scanner:
Database Query In the SOL Query Processing, the scanner step
involves tokenizing the SQL query, breaking it into
individual units (tokens) such as keywords, identifiers,
Scanner
literals, and symbols, to facilitate further parsing and
analysis.

Parser
Parser:
The SQL query is analyzed to ensure its syntax is
Validation correct. The query is broken down into components
such as keywords, table names, columns, and
conditions.
Query Optimizer

Validation:
During the validation step in SQL Query Processing, the
Code Generator
database management system ensures the correctness
and integrity of the SQL query by verifying the existence
Result of the Query of referenced tables and columns, checking data types,
and validating syntax and semantics.

Query Optimization: Code Generator:


The DBMS generates alternative execution plans and Translates the optimized query plan into executable

selects the most efficient one based on factors like code, determining how to access and manipulate data

indexing, join strategies & available resources in the underlying database system for efficient query
execution.

Database Processor:
Executes the generated code, interacting with the underlying database to retrieve, manipulate, or store data according
to the user's query.

35 DBMS Cheatsheet
7 Transaction Management

A transaction is a sequence of one or more operations (SQL statements) that are executed as a
single, indivisible unit of work. Transaction management in DBMS refers to the process of
ensuring the reliable and consistent execution of database transactions.

ACID Properties

A C I D

Atomicity Consistency Isolation Dependency

Atomicity Consistecy 1 Atomicity 2 Consistecy

Each transaction is The database must be If any statement in the Transaction must
either properly carried in a consistent state transaction fails, the meet all protocols
out or the database before and after the entire transaction defined by the
reverts back to the transaction. fails, and the database ssystem -- no partially
state before the is left unchanged. completed transac-
transaction started. tions.

Isolation Durability 3 Isolation 4 Durability

Multipe transaction Successful transaction No transaction has Once a transaction


occur independently are persisted even in acccess to any other has been committed,
without interference. the case of system transaction that is it will remain commit-
failure. unfinished. Each ted through the use of
transaction is transaction logs and
independent. backups.

36 DBMS Cheatsheet
Atomicity
A B
Before $30 Before $100
Transfer Process
Debit $10 Debit $10

Available $20 Available $110

Debited Successfully Credit Successfully


Complete Execution Automicity
Execution Successful

A B
Before $30 Before $100
Transfer Process
Debit $10 Debit $10

Available $20 Available $110

Debited Successfully Partial Execution Credit Failure


No Automicity
Execution Termination

Consistency
A
Before $300

Debit to B $50

Available $250

Debit to C $20

Value read Available $230 Value read


by B = 300 by C = 250
before T T before T
B C
Before $100 Before $50

Debit $50 Credit $20

Available $150 Available $70

Data Constistent

37 DBMS Cheatsheet
Isolation
A B
Before $100 Before $50

Debit to B $20
T1
Credit by A $20

Available $80 Available $70

Debit to C $20
T1 was $100
Available $60
Value read by Value read by B before
C before T2
was $80 T2
C
Before $70

Credit by A $20

Available $90

Durability
Changes to
Crash
be applied

Reboot

Stage 1 Stage 2 Stage 2

State 2 is re-constructed and


fully recovered using
Transaction Log
Non-Volatile
Storage

Transaction Log

38 DBMS Cheatsheet
Concurrency Control

Concurrency control in a database system


manages simultaneous access to shared
resources, ensuring transactions can execute
concurrently without leading to inconsistencies.

Lock-Based Concurrency Control Multi-Version Concurrency Control (MVCC)

It uses locks to restrict access to data, ensuring It allows multiple versions of a data item to
only one transaction can modify a piece of data coexist, enabling transactions to read a snapshot
at a time, preventing conflicts. of the database without blocking each other.

Database Security Authentication


Confirms users are who they say they are
Database Security strives to ensure that only
authenticated users perform authorized activities
User Name

Authentication Log in

Login Name
Users Password
Authorization
Gives users permission to access a resource

Authorization

Permissions

Database

39 DBMS Cheatsheet
DATA BACKUP

A data backup is a copy or archive of important information from your device.

Copy Emergency

Create a copy of your Store it in a secure, Recognize the backup


important information. separate location. as a restoration method
for your device.

Data Recovery from


Operational Efficiency Risk Management
Disasters

Protection Against Cyber Importance of


Cost Savings in Recovery
Threats Data Backup

Data Loss Prevention Historical Data Retrieval Business Continuity

40 DBMS Cheatsheet
Backup Strategies

Advantage: Complete data recovery.


Full Backup Copies all data at
a specific point in time Disadvantage: Consumes more storage
and time.

Advantage: Faster backups, less storage


Backup Strategies Incremental Backup Backs up only changed
space.
data since the last backup
Disadvantage: Consumes more storage
and time.

Advantage: Faster recovery than


Differential Backup Backs up data changed
incremental.
since the last full backup
Disadvantage: More storage than
incremental.

Full backup

Data is copied in its entirety every time.

Backup Repository

Source Data 1st backup 2nd backup 3rd backup 4th backup

41 DBMS Cheatsheet
Incremental Backup

Data is copied in its entirety to begin with, and then only new or updated data is backed up
each time a backup is initiated after that.

Backup Repository

Source Data 1st backup 2nd backup 3rd backup 4th backup

Differential Backup

Data is copied in its entirety to begin with, and then only sets of backup with a change are
backed up each time a backup is initiated after that.

Backup Repository

Source Data 1st backup 2nd backup 3rd backup 4th backup

42 DBMS Cheatsheet
Data Recovery

Data Recovery

Identify Data Loss Event:


Recognize and determine the
cause of the data loss event.

Assess Extent of Data Loss:


Evaluate the impact and
scope of the data loss.

Pick Data Recovery Method

Restore from Backup: Rebuild from Redundancy:


If backups are available, restore If redundancy measures are in
the data to its previous state place, rebuild the lost data
from the backup copies. using redundant copies or
distributed systems.

Verify Data Integrity:


Ensure the restored or rebuilt data
maintains integrity by verifying
against checksums, data consistency
checks, or other validation methods

Apply Logs and Archives:


If applicable, apply transaction
logs and archives to bring the
data up to the point of failure,
ensuring consistency

Complete Recovery: Final Verification:


Finalize the recovery process, Verify the completeness and
making the data available for accuracy of the recovered data
regular operations

43 DBMS Cheatsheet

You might also like