Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

ADBAssigment 1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

COM809 ADVANCE DATABASE SYSTEM

Question: what are types of transactions in database system?

1.1.1 A Database Transaction is a logical processing unit in a database management system


that includes one or more database access activities. Database transactions, in a nutshell,
represent actual events for any company.

1.1.2 Properties of transactions

1.1.3 Atomicity: A transaction is deemed to be atomic if it consistently completes all of its


operations in a single step or doesn't operate at all. This implies that the transaction's operations
are carried out either entirely or not at all.

1.1.4 Consistency: Data must adhere to various restrictions or regulations inside the database systems
in order to maintain consistency, which is a trait that requires data updated via transactions.

1.1.5 Isolation: Users can access data continuously and simultaneously using modern DBMSs.
The property that enables concurrency control is isolation, which ensures that changes made to
one transaction won't influence how another transaction operates. Although they appear to be
executed sequentially, two parallel transactions are actually isolated.

1.1.6 Durability: Durability, the final ACID feature, relates to the ongoing existence of
committed transactions. Transactions and database changes are stored to permanent storage, such
as drives, rather than being retained in volatile memory.

1.1.7 Concurrency Control: A DBMS's method for managing concurrent processes without
their clashing is known as concurrency control. If all users are only reading data, concurrent
access is fairly simple. They cannot possibly interfere with one another. Even though read and
write operations would often be mixed in any practical database, ensuring concurrency is
difficult. These conflicts, which primarily arise in multiuser systems, are dealt with using
concurrency control. It helps you make sure that concurrent database operations are performed
without endangering the integrity of the corresponding databases' data

1
2.2 Types of transactions in database system

2.2.1 Nested Transactions

A "nested transaction" is a transaction that has another transaction as part of its initiating point
and end point. Therefore, transactions are nested inside of transactions. Sub-transactions are the
term used for these layered transactions. In a nested transaction, the top-level transaction has the
ability to open sub-transactions, and each sub-transaction has the ability to open additional sub-
transactions, up to any depth of nesting, (Bernstein & Newcomer 2009).

2.2.2 Advantages of Nested Transactions

 Sub-transactions at one level may operate concurrently with other sub-transactions, adding
more concurrency to the transaction.
 More durable Sub-transactions can independently commit or abort.
 For instance: a process to send mail to a specified set of recipients

2.2.3The rules for committing of nested transactions

 Only after its child transactions have finished do parent transactions commit or abort.
 A sub-transaction independently decides whether to tentatively commit or abort when it is
finished. Its choice to terminate is final.
 All of a parent's child transactions are canceled when it aborts, even if some of them have
already been tentatively committed.
 The parent can choose whether to cancel the sub-transaction when it fails.

 All of the sub-transactions that have been tentatively committed can commit after the top-
level transaction has completed.

2
2.2.4 Characteristics of Nested Transactions

(1)Children can execute tasks continuously or sequentially, and the parent waits until all of the
children have finished (no communication between parent and children). (2) Each subtransaction
is segregated from each sibling, including all of its offspring (and its descendants). As a result,
nested transactions are non-deterministic while siblings are serializable but order is not
predetermined. (3) Nested concurrent transactions can be serialized.

2.3 Multilevel transactions

Multilevel transactions: A variation of stacked transactions known as multilevel transactions


refers to the execution of activities at specific levels of abstraction inside layered system
architecture. A tree's edges describe how an operation is carried out by a series (or partially
ordered ordering) of operations at the next lower level. Transactions using record and index-key
accesses as high-level activities, which are then implemented by reads and writes of database
pages as low-level operations, are an example of this approach in action. In order to achieve
serializability at the top level equivalence to a sequential execution of the transaction roots the
model enables reasoning about the soundness of concurrent executions at various levels (Jajodia
& Kerschberg 2012).

2.3.1Advantages of multilevel transaction

 The transactional environment in which a specific process will be utilized need not be known
to the procedure's inventor.
 It is possible to apply the same process to various transaction circumstances. Different
properties are supplied for each situation.
 Data is seen as a progression of rising, application-specific abstraction levels.
 A collection of abstract objects and abstract procedures (methods) for accessing those objects
are supported at each level.
 Compare with distributed and nested models
 The abstractions at the next lower level are used to implement each abstract operation as a
transaction.
 A hierarchical group of subtransactions make up a multilayer transaction.

3
 While multilevel transactions are atomic and their concurrent execution is serializable, a
subtransaction's commitment is unconditional, causing it to release its locks.
 One subtransaction at a time, the parent initiates it and waits for it to complete.

2.5 Check pointing

The checkpoint is used to identify a time before which all transactions were committed and the
DBMS was in a consistent state. These checkpoints are tracked throughout transaction execution.
Transaction log files will be produced upon execution. By saving its update to the database after
reaching the save point or checkpoint, the log file is deleted (Connolly & Begg 2019).

2.5.1 Advantages of using Checkpoints:

 The data recovery procedure is accelerated by it.


 Most dbms packages automatically checkpoint themselves.
 The log file's checkpoint records are utilized to stop pointless redo operations.
 It has a very low overhead and can be performed frequently because dirty pages are
continuously flushed out in the background.

2.5.2 Real-Time Applications of Checkpoints:

 Checkpoints are used to verify and validate any time a real-time environment is used to
test an application that might have changed the database.
 Checkpoints are used to make backups and recoveries before the database is updated.
 The database is put back into the checkpoint state using the recovery system.

2.6 Flat transaction

Each transaction in a flat transaction is independent of and decoupled from other transactions in
the system. The current transaction must finish before another may begin in the same thread. The
most common model, supported by the majority of commercial database systems, is flat
transactions

2.6.1 Limitations of a flat Transaction:

 If there is a crash, all work is lost.

4
 A single DBMS can only be utilized at once.
 There is no way to roll back in part.

2.7 Long-lived Transaction

A transaction that spans several database transactions is referred to as a long-lived transaction.


The transaction is deemed "long-lived" because the requirements of the business logic require
that its bounds go beyond a single database transaction. A series of database transactions
combined together to produce a single atomic result can be considered a long-lived transaction.

You might also like