Distributed Database Concepts and Transactions

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/28

flashcard set

Earn XP

Description and Tags

A set of vocabulary flashcards covering key concepts of distributed databases, transaction properties (ACID), locking mechanisms, the CAP theorem, and indexing techniques.

Last updated 2:47 PM on 5/14/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

29 Terms

1
New cards

Transaction

A logical unit of work which completes in its entirety or not at all, aimed at keeping the database consistent.

  • Aim to to keep database consistent

  • Can contain any number of database operations using SQL

2
New cards

COMMIT

An operation that successfully ends a transaction and commits the changes made to the database.

3
New cards

ROLLBACK

An operation used when an error occurs to undo all actions performed within a transaction.

4
New cards

Atomicity

The ACID property ensuring that a transaction completes in its entirety or not at all.

5
New cards

Consistency (ACID)

The ACID property requiring that the database must be in a consistent state after a transaction.

6
New cards

Isolation

The ACID property ensuring that each transaction executes independently of others.

7
New cards

Durability

The ACID property ensuring that changes made by a transaction must persist, often managed by a recovery system.

8
New cards

OLTP

Online Transaction Processing; systems providing quick, real-time access to data for reading or modification.

9
New cards

OLAP

Online Analytical Processing; an alternative to OLTP that involves fewer but more intensive transactions.

10
New cards

Shared lock

A read-only lock that allows transactions to read parts of the database.

11
New cards

Exclusive lock

A lock that allows a transaction both read and write access to a part of the database.

12
New cards

Two phase Locking (2PL)

A locking rule where unlock operations are only performed after all locks for a transaction have been acquired.

13
New cards

Deadlock

A situation where two transactions are each waiting for the other to release a lock, potentially resolved by timeouts or rollback.

14
New cards

Deadlock detection

The process of rolling back the transaction which would cost the least amount to stop when a deadlock is identified.

15
New cards

Consistency (CAP)

The aspect of the CAP Theorem ensuring the database is in a consistent state, achieved by rolling back if an error occurs.

16
New cards

Availability (CAP)

The aspect of the CAP Theorem ensuring that every query request gets a response.

17
New cards

Partition Tolerance (CAP)

The aspect of the CAP Theorem stating a distributed database can cope with network failures or delays between nodes.

18
New cards

CAP Theorem

A theory stating that a distributed database can only expect to have two of the three aspects: Consistency, Availability, and Partition Tolerance.

19
New cards

Checkpoints

Periodic logs noting which transactions are running or committed; transactions are suspended while data is written to the disk.

20
New cards

Clustered index

An index that relates to the physical order of data on the disk, with only one allowed per database table.

21
New cards

Non-clustered index

An index containing a row locator or pointer to the data row rather than storing the data itself.

22
New cards

Problems with transactions

  • Lost update problem

  • Dirty Read

  • Inconsistent Analysis

  • Making all transactions run serially will fix this but there are performance issues if only one transactions can ever run at once

  • Read operation can be run in parallel

  • if a transaction is writing to one part of the database, can still access other parts not affected by the update

23
New cards

Locking

To fix issues with transactions DBMS needs a serialisable schedule

  • Locking - transactions lock part of DB before updating

24
New cards

Lost update problem

Two users are operating on same expense system, U1 reads balance has 20000, but T2 changes balance and write it, then T1 still thinks balance is unchanged and changes and write there own balance so T2 changes are lost

25
New cards

Dirty Read

T1 reads value as 310 which was changed by T2 but then an error causes T2 to rollback to original value of 300, so T1 has an inconsistent value

26
New cards

Inconsistent Analysis

If T2 updates rows mid transaction, T1 can read a mix of old and new values, which would cause errors in the transactions

27
New cards

Indexing

Without an index a DBMS would have to search whole tables, so it can use an index to jump into middle of data without searching through all. Set up by database administrator.

28
New cards

Deadlock Prevention

Look out for a problem in advance - not common as its difficult

29
New cards

Logging and Archiving

Databases keep a log of all transactions in order they happened, includes before and after values. Databases are also regularly archived by its administrators onto offline storage