phdcomp

 

Databases

Page history last edited by Beberg 1 mo ago

Databases

 


 

Review Sessions 2009

 

 

Group members

Visit the google spreadsheet for a live lists when needed.

 

 

Meetings

 

Who When I can meet
Example M-F, 8am-5pm

 

 

Notes

http://carlstrom.com/stanford/comps/Databases.txt

http://www-db.stanford.edu/~ullman/fcdb/slides.html

 

OLD STUFF

 

2008 Review Notes:

 

Oct 4 http://phdcomp.pbwiki.com/f/Review%20for%20Database%20Comp%20Oct%204%202008.ppt

Oct 11 http://phdcomp.pbwiki.com/f/Review%20for%20Database%20Comp%20Oct%2011%202008.ppt

Oct 18 http://phdcomp.pbwiki.com/f/Review%20for%20Database%20Comp%20Oct%2018%202008.ppt

 

Q & A (for 2008 comp)

 

Question 1:

For 2007 Q6(a), Transaction 1 is Read Committed, so it can only read data after Transaction 2 is committed.

So why is there any non-serializable behavior possible?

 

If the non-serializable behavior caused by executing Transaction 1 first, then there is also a possibility for (b) to be non-serializable, right?

 

Response:

In a concurrent database system, the statements from multiple transactions can be interlaced. In Q6, T2 is at the highest isolation level, and each database record it touches will be locked until the end of the transaction.

 

For 6a), imagine that lines 1-4 of T2 are scheduled to run between line 2 and 3 of T1. Then T1-T2 has a read-write dependency on records of table R, and T2-T1 has a write-read dependency on records of table S. These dependency relationships dictate that part of T1 runs before T2, and part of T2 runs before T1, so this schedule cannot be serialized.

 

For 6b), line 4 of T2 ("commit") runs either before line 2 of T1 or after it, and either way the schedule involving T2 and T1 can be serialized, since there is no circular dependency as in 6a).

 

For 6c), if you schedule line 1-3 of T2 to run between line 2 and 4 of T1, then you again have the circular dependency, which means that this schedule of T1 and T2 cannot be serialized.

 

A good reference for the above concepts can be found at

http://en.wikipedia.org/wiki/Isolation_(database_systems)

 

 

Comments (0)

You don't have permission to comment on this page.