## Forum Stats

• 3,767,858 Users
• 2,252,726 Discussions

Discussions

# Hey guys! May i know what is the possible way to achive 22 marks for these questions?

Member Posts: 12 Green Ribbon

• Member Posts: 1,720 Bronze Crown

Community Posting Etiquette - oracle-tech

Don't post exam or certification questions for other users to answer

This is considered cheating and is not permitted. Your account may be suspended or banned for this type of activity.

• Member Posts: 12 Green Ribbon

But this is just a tutorial questions within my subject!

• Member Posts: 4,327 Silver Crown

You could start by discussing each step. Begin with the first: "begin-trans". What does that mean, and how would you implement it?

• Member Posts: 12 Green Ribbon

Good Day John Watson! The "begin-trans" is stating that the transaction starts there.

pls correct me if im wrong,

Lost-Update Problem

As for the transaction T1, the value A is being read at time t1 which is 160 and value B is being read at time t2 which is 60. During time t2, Transaction T2 begins, and value B is being read as well which is known as a dirty-read. Followed by time t4, the value B has been calculated in Transaction 1 and on time t6, value B has been partially committed which is 120 meanwhile, in Transaction T2 time t5, value B has been calculated as well which now holds 120 and is being partially committed as well. Lastly, value B which is 120 has been committed in Transaction 1 on time t7 and later followed by value B which is 120, committed in Transaction 2 on time t11. This is when Lost-Update problem occurs whereby the value B on Transaction 1 is overwritten by value B on Transaction T2.

Versioning Approach --> still unsure sir, hope to have guidance from you!

• Member Posts: 4,327 Silver Crown

If I were your teacher, I would be asking whether you understand why the problem could occur. That would mean going back to "begin-trans". What is it doing? What level of isolation (if any) is it implementing? What sort of locks would be applied? You could refer to the commonly used isolation levels, such as "serializable" or "read uncommitted".

One particular point: your term "partially committed" would cause Ted Codd to rollback in his grave.

• Member Posts: 12 Green Ribbon
edited Sep 27, 2021 7:07PM

U meant why lost-update occurred? Isnt it because of the value B of Transaction 1 being overwritten by value B of Transaction T2?

And the begin-trans is stating the transaction begins there isnt it ? Im really not good at this im sorry