1.3.2 transactions Flashcards

1
Q

what ia a transaction?

A

transaction is a group of operation in a database that complete task.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

problems that arise from transactions.

A
  • concurrency:when multiple transaction are executed simultaneously, they may try to access or edit the same data causing inconsistency.
  • deadlock: when two or more transaction are waiting on each other to release resources, causing them to wait indefinitely.
  • data integrity: transactions may leave the database inconsistent if they fail mid execution .
    isolation: in a multi-user environment a user transaction could have an effect on another user transaction.
  • durability: If a system fails after a transaction has been confirmed, it may result in loss of data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is ACID

A

ACID are set of rules that DBMS should follow to ensure data integrity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

ACID

A

Atomicity:
All operations in a transaction succeed or fail as a whole

If any operation fails, the transaction is rolled back

Ensures partial transactions do not occur

Consistency:
Ensures data remains in a consistent state after transactions

Transactions must follow database rules and constraints

Starts with a consistent state and ends with a consistent state

Isolation:
Transactions are isolated from each other

Intermediate states are not visible to other transactions

Prevents conflicts and data inconsistencies

Durability:
Committed transactions persist even in case of system failures

Ensures data is not lost once a transaction is complete

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

record locking

A

It is usual for databases to be accessed by multiple people at any one time.
This can cause issues if people are trying to simultaneously access the same record. One person could accidentally overwrite the other person’s change.
Record locking avoids this by preventing anyone accessing a record in use by another person.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Redundancy

A
  • Redundancy can occur when the same piece of data is stored in more than one table in a database. This can either be by accident or by design
  • It can lead to inconsistencies in the data and/or wasted storage space
How well did you know this?
1
Not at all
2
3
4
5
Perfectly