Transaction and Concurrency Control (MIDTERMS)

0.0(0)
studied byStudied by 0 people
full-widthCall with Kai
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/21

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

22 Terms

1
New cards

transaction

Is a collection of operations that form a single logical unit of work.

2
New cards

 database request

Is the equivalent of a single SQL statement in an application program or transaction.

If a transaction has three (3) update statements and one (1) insert statement, the transaction uses four (4) ____________.

3
New cards

Database consistent state

 satisfies the constraints specified in the schema.

Assume that a specific table contains a gender column where it only accepts an entry having values of “Male” and “Female”. If a user attempts to enter a value of ‘Person’, then the database will disallow the entry of such a value.

4
New cards

Transaction log

A DBMS uses this to keep track of all the transactions that update the database.

In the case of system failure, this log helps bring the database back to a consistent state.

5
New cards

Atomicity

This requires that all operations (SQL requests) of a transaction should be completed.

Example: Transaction T1 has four (4) SQL requests that must be successfully completed. Otherwise, the entire transaction is aborted.

6
New cards

Consistency

This ensures that only valid data following all rules and constraints will be written in the database. When a transaction results in invalid data, the database reverts to its previous sta

7
New cards

Isolation

The data used during the execution of a current transaction cannot be used by another transaction until the first one is completed.

8
New cards

Durability

ensures that once transaction changes are done and committed, they cannot be undone or lost.

9
New cards

Atomicity requirement

If the transaction fails after step 3, and before step 6, the system should ensure that its updates are not reflected in the database, an inconsistency will result.

10
New cards

Consistency requirement

The sum of Aldous' account and Brendon's account is unchanged by the execution of the transaction. 

If between steps 3 and 6, another transaction is allowed to access the partially updated database, it will see an inconsistent database.

11
New cards

Isolation requirement

Transactions should be run sequentially. Therefore, no other transaction will happen on both accounts until the current transaction is completed.

12
New cards

Durability requirement

Once the user has been notified that the transaction has completed (i.e., the transfer of the P1000 has taken place), the updates to the database by the transaction must persist despite failures.

13
New cards

BEGIN TRANSACTION

 This marks the beginning of transaction execution.

14
New cards

COMMIT 

This signals a successful end of the transaction so that any changes (updates) executed by the transaction can be safely committed to the database and will not be undone.

15
New cards

ROLLBACK TRANSACTION

This signals that the transaction has ended unsuccessfully so that any changes or effects that the transaction may have applied to the database must be undone.

16
New cards

SAVE TRANSACTION

 is a point in a transaction when you can roll the transaction back to a certain point without rolling back the entire transaction.

17
New cards

@@TRANCOUNT

- returns the number of BEGIN TRANSACTION statements that have occurred on the current connection.

18
New cards

Active state 

in this state, a transaction stays in this state to perform READ and WRITE operations.

19
New cards

Partially committed state

where the final statement in queries has been executed

20
New cards

§ Committed state -

 after all the operation has been completed

21
New cards

Failed State

 if one of the operations cannot be done or proceed

22
New cards

Terminated

corresponds to the transaction leaving the system and if it is either committed or aborted