Chritian Nelven Cuyam June 1, 2022 Bsis-3B: Explanation

You might also like

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

Chritian Nelven Cuyam

June 1, 2022
BSIS-3B

1. A group of related tasks that are carried out in a single session is referred to as a
transaction. 
2. The ability of a computer system to allow many threads of execution at the same time
concurrently is known as concurrency.
3. In order to manage transactions in a database, two commands known as "commit" and
"rollback" are utilized. Committing changes to the database implies saving those
modifications, whereas rolling back changes means reverting to the previous state of the
database.
4. A save point is a marker that may be found inside the transaction log that indicates a
point at which the transaction can be rolled back to. This marker is also known as a save
point marker.
5. A situation known as a deadlock occurs when two or more processes are unable to
proceed because they are waiting on one another to free up a resource.
6. A share lock is a type of lock that allows multiple transactions to read a particular
resource, but only one transaction to write to that resource. An exclusive lock is a type of
lock that allows only one transaction to read or write to a particular resource.
7. The ANSI/ISO SQL standard specifies four different types of isolation levels, which are
referred to as read uncommitted, read committed, repeating read, and serializable.

Explanation:

1. Data can often be inserted, updated, or deleted through the use of transactions.
Transactions are utilized to accomplish the goals of maintaining data consistency and
lowering the likelihood of data corruption.
2.  Most concurrency is achieved using threads. Threads are programmed execution
pathways. A programmed can conduct numerous operations simultaneously utilizing
threads.
Concurrency has pros and cons. Concurrency improves resource utilization and
performance. Concurrency can cause issues if not used properly.
3. The database command known as "commit" is responsible for saving all of the
transactions that have occurred in the database since the previous time it was
committed.
Chritian Nelven Cuyam
June 1, 2022
BSIS-3B

A rollback is a command in a database that undoes all of the transactions that have
occurred since the last commit.
4. A savepoint is a point in the middle of a transaction that allows the transaction to be
undone to a previous state. Savepoints are a convenient way to partition a lengthy
financial transaction into more manageable chunks. Because of this, if an error does
occur, it will only be necessary to roll back the portion of the transaction that occurred
after the savepoint.
5. It's possible for a situation to become stuck in a deadlock when two or more processes
are all waiting for one another to free up a resource before they can proceed. For
instance, Process A may be waiting for Process B to release a certain file, while Process
B could be waiting for Process A to release a particular printer. Both processes could be
waiting for the other to complete their respective tasks. There is a possibility of a
deadlock developing if neither of the processes ever frees the resources they are waiting
for.
6. Both types of locks have advantages and disadvantages that need to be considered.
Exclusive locks offer superior protection against data corruption compared to share
locks, which allow for a greater number of transactions to be processed concurrently.
7.  

 The lowest isolation level allows transactions to read uncommitted data. This can lead to
dirty reads, where a transaction reads data that's later rolled back.
 The next highest isolation level only allows transactions to read committed data. This
prevents dirty readings but can cause non-repeatable and ghost reads.
 Repeatable read is the next highest isolation level, where transactions can only read
committed data and read data can't be edited or deleted until the first transaction
completes. This avoids dirty, phantom, and non-repeatable reads.
 Serializable is the maximum isolation level, where transactions can only read committed
data and read data can't be edited or deleted until the initial transaction completes. Any
new data added by a transaction can't be read by another transaction until it's finished.
This prevents unclean, non-repeatable, phantom, and lost updates.

You might also like