






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







-^
There’s a later version of x whose tid ≤ T-Oldest(or is on every active query’s commit list)
-^
Data page contains latest version of each record, whichpoints to older version in rollback segment.
-^
Read-committed query reads data as of its start time.
-^
Read-only isolation reads data as of transaction start time.
-^
“Serializable” query reads data as of the txn’s start time.^ –
An update checks that the updated record was not modifiedafter txn start time.
If that check fails, Oracle returns an error.
If there isn’t enough history for Oracle to perform the check,Oracle returns an error. (You can control the history area’s size.)
What if T
1
and T
modify each other’s readset concurrently? 2
Problems when using 2PL with inserts and deletes T
: Read Accounts 1, 2, and 3 1 T
: Insert Accounts[4, Tacoma, 100] 2 T
: Read Assets(Tacoma), returns 500 2 T
: Write Assets(Tacoma, 600) 2 T
: Read Assets(Tacoma), returns 600 1 T
Acct# Commit
Location
Balance
Location
Total
Seattle
Tacoma
Tacoma
Seattle
Tacoma
Accounts
Assets The phantom record
-^
1
-^
Read end-of-file?
Read record counter?
SQL Select operation?
-^
-^
1
-^
-^
-^
-^
-^
Use a version number on the page and in the lock Process A
r
Process B
r
Can cache a page in two processesthat write-lock different records
-^
Only one process at a time canhave write privilege
-^
Use a global lock manager
-^
When setting a write lock on P,may need to refresh the cachedcopy from disk (if another processrecently updated it)
-^
-^
-^
This requires locally-assigned LSNs
Must flush the log before flushing an updated page
-^
Record id = [page-id, offset-within-page]
Most common DB index structures: hashing and B-trees
DB index structures are
page-oriented
-^
V = social security numbers. B = {1 .. 1000}H(v) = v mod 1000
If a page overflows, then use an extra overflow page
At 90% load on pages, 1.2 block accesses per request!
BUT, doesn’t help for key range access (10 < v < 75)