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

Week 5 Database System

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Week 5 Database System

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

DCOMP114

Transaction Processing

WEEK 5

ALL RIGHTS RESERVED


No part of this document may be reproduced without written approval from Limkokwing University of Creative Technology
Introduction

In this presentation, we will explore the fundamental concepts of


transaction processing in database management. We will examine
the importance of transaction processing in ensuring data integrity
and consistency, and discuss the main techniques and tools used to
manage transactions in a database system.

ALL RIGHTS RESERVED


No part of this document may be reproduced without written approval from Limkokwing University of Creative Technology, Sierra Leone Campus
ACID properties

ACID (Atomicity, Consistency, Isolation, Durability) properties


are the essential properties that ensure reliable transactions in a
database management system. These properties define a set of
standards that guarantee that the data in the database is
accurate and consistent, even in the face of failures or errors.
Atomicity, Consistency, Isolation,
Durability

• Atomicity means that each transaction is treated as a single, indivisible


unit of work. This means that either all of the changes in a transaction
are applied or none of them are.

• Consistency means that each transaction must bring the database from
one valid state to another. This means that any changes made to the
database during a transaction must adhere to the rules and constraints
that govern the data in the database.
Atomicity, Consistency, Isolation,
Durability

• Isolation means that transactions are executed in such a way that they
appear to be running alone, even if there are multiple transactions
occurring at the same time.

• Durability means that once a transaction is committed, its changes are


permanent and will survive any subsequent failures, such as power
outages or crashes. This means that the database can be restored to a
consistent state even after a system failure.
Concurrency control

Concurrency control is a mechanism used in database systems


to ensure that transactions are executed in a way that preserves
the consistency and correctness of data. It is particularly
important in multi-user database systems where multiple
transactions may be executing concurrently.
There are two main types of
concurrency control:

• Locking is a technique where transactions acquire and release


locks on the data they access in order to prevent other
transactions from modifying it at the same time.

• Timestamping is a technique where each transaction is assigned


a timestamp, and the database system uses these timestamps to
determine the order in which transactions should be executed.
For Example:

Suppose two transactions, T1 and T2, both want to update the same row in a
table. If locking is used for concurrency control, one of the transactions (say T1)
will acquire a lock on the row before making the update, and the other transaction
(T2) will have to wait until T1 releases the lock before it can access the row. On
the other hand, if timestamping is used, the database system will assign each
transaction a timestamp, and the transaction with the earlier timestamp (say T1)
will be allowed to update the row first, while the other transaction (T2) will have to
wait until T1 has finished.
Recovery and backup

Database backups and recovery are critical components of


database management. The process of backing up a database
involves creating a copy of the database data and storing it in a
secure location. Recovery, on the other hand, involves restoring
the database to its previous state after a failure or data
corruption.
Types of backup:

There are three types of backup: Full, Differential, and


Incremental. Full backup copies all data in the database, including all
changes made since the last full backup. Differential backup copies
all data that has changed since the last full backup, while
incremental backup copies only the data that has changed since the
last backup, whether it was a full or differential backup.
Types of recovery:

There are different types of recovery, including Rollback, Point-in-


Time, and Forward Recovery. Rollback recovery involves undoing any
incomplete transactions and returning the database to its last
consistent state. Point-in-Time recovery involves restoring the
database to a specific point in time. Forward recovery is used to
bring the database forward to a consistent state after a failure.
Database Scalability

Database scalability refers to the ability of a database to handle


increasing amounts of data and user traffic while maintaining
optimal performance. It is an important consideration for any
business that is experiencing growth or expects to grow in the
future.
Vertical scaling

Vertical scaling, also known as scaling up, involves adding more


resources (e.g. CPU, memory, storage) to a single server to
improve its performance. This approach is typically limited by
the maximum capacity of the server and can be expensive.
Horizontal scaling

Horizontal scaling, also known as scaling out, involves adding


more servers to a database system to improve its performance.
This approach can be more cost-effective and scalable than
vertical scaling, but it requires additional resources for load
balancing and synchronization.
Load balancing

Load balancing involves distributing the workload across multiple


servers to improve performance and avoid overloading any one
server. This can be achieved through hardware load balancers or
software load balancing tools.
Partitioning

Partitioning, also known as sharding, involves dividing a


database into smaller, more manageable parts. This can improve
performance by reducing the amount of data that needs to be
processed and stored on each server. However, it can also make
it more difficult to manage and query the data.
Replication

Replication involves creating multiple copies of a database to


improve availability and reliability. This can be done through
various techniques such as master-slave replication or multi-
master replication.
In conclusion, this presentation on transaction processing provides attendees with a comprehensive
understanding of the key concepts, principles, and techniques used in database management. By
implementing these strategies, organizations can ensure the integrity and accuracy of their data,
and maintain a high level of performance and efficiency in their database systems.

In conclusion, this presentation on transaction processing provides

students with a comprehensive understanding of the key concepts,

principles, and techniques used in database management. By

implementing these strategies, organizations can ensure the

integrity and accuracy of their data, and maintain a high level of

performance and efficiency in their database systems.

ALL RIGHTS RESERVED


No part of this document may be reproduced without written approval from Limkokwing University of Creative Technology, Sierra Leone Campus

You might also like