idiot terms for databases

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

1/19

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.

20 Terms

1
New cards

conservative 2PL

prevents deadlocks by acquiring all locks at T start

2
New cards

strict 2PL

prevents cascading aborts by releasing all locks at T end

3
New cards

constructing a waits-for graph

nodes are Ts, edge from T1 —> T2 if T1 waits for lock held by T2

4
New cards

wound-wait protocol

only lower priority waits for a higher priority

5
New cards

wait-die protocol

only higher priority waits for a lower one

6
New cards

phantom

T1 reads data, T2 inserts data, T1 reads again

7
New cards

how does crabbing work when traversing a tree?

lock enxt node, then unlock the parent, then repeat until you reach the leaf

8
New cards

how does the locking procedure work assuming updates?

initiate write locks up to a safe node (less than half-full or more than half-full)

9
New cards

what is an intention lock?

have locks indicating that you want a contained object

10
New cards

based on the validation phase, T1 cannot have conflicted with T2 if:

T1 finishes before T2, or T1 completes before T2 starts writing

11
New cards

how does timestamp-based concurrency control work?

associate Ts with timestamps TS(T)
store last read/write of objects RTS(A) and WTS(A)

12
New cards

when do you abort/restart under timestamp CC?

if T wants to read A: abort if TS(T) < WTS(A) - bc every operation should happen right when T starts

if T wants to write A: abort if TS(T) < RTS(A) - a future transact should have read T’s value

13
New cards

Thomas-Write Rule

ignore outdated writes: if T wants to write A and TS(T) < WTS(A), just act as if T’s write never happened because a younger T’ already wrote

14
New cards

how does multi-version CC work?

keep multiple versions of DB objects
each write creates a new version of an object
map each read to the last version of an object before the TS of T

15
New cards

how does the write check under multi-vers CC work?

can T with timestamp TP write object A?
assume T’ with timestamp greater than TP

if T’ has already read A, we must abort

16
New cards

how does snapshot isolation work?

each T operates on a DB snapshot taken when T starts, using the last committed value for each object (different from MVCC b/c no uncommitted values)

17
New cards

what are the two components of write-ahead logging?

  1. write all log entries relating to a T before committing it (can use for a redo)

  2. write all log entries of a SINGLE buffer page before persisting to disk (use for undo)

18
New cards

what are the three phases of ARIES?

  1. analysis: determine Ts to undo/redo after a log

  2. redo: get back to state before crash

  3. undo aborted Ts active during crash

19
New cards

What are the main data structures used by ARIES?

  1. log tail: most recent entries not used yet in disk

  2. flushed LSN: # of most recent entry on disk

  3. T table: stores T, status, and last LSN produced by that T

  4. dirty page table: currently changed but unpersisted pages and the first LSN that made them dirty

20
New cards

Explore top flashcards