Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Suppose we have a transaction T that is a function which runs “forever,” and at

ID: 3841637 • Letter: S

Question

Suppose we have a transaction T that is a function which runs “forever,” and at each hour checks whether there is a PC that has a speed of 3.5 or more and sells for under $1000. If it finds one, it prints the information and terminates. During this time, other transactions that are executions of one of the four programs described in Exercise 6.6.1 may run. For each of the four isolation levels — serializable, repeatable read, read committed, and read uncommitted — tell what the effect on T of running at this isolation level is.

Explanation / Answer

The four isolation levels are serializable, repeated read, read committed and read uncommitted.

Serializable: Once T starts, it would not be able to know about any changes to the database. So, it is not needed to run T in a serializable way.

Repeated read: If this is used, then T will be able to see the tuple continuously and also any newly added tuples to the database will also be visible to T. This is needed to find the PC with speed 3.5 and sells under a certain price.

Read committed: This is also possible. When this is used, T will eventually be able to know about any new or updated tuple by other transactions while not creating any conflicts or constraints for those transactions.

Read uncommitted: This is also possible. As soon as new information is put into the database, it can be seen by T. So, if the person making the database entry changes their mind soon and aborts the change, then T has already seen the new information that it shouldn't see.

Hence, serializable is definitely not needed at all.

And repeatable read, read committed and read uncommitted are all possibilities with various advantages and drawbacks as mentioned above.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote